@aws-cdk/coreeffort/smallfeature-requestgood first issuep2
Description
Describe the feature
I noticed that the ZIP files produced by CDK are quite a bit larger than those produced, for example, by the "Compress" functionality in macOS Finder for the same content.
The feature request is that the compression level of zlib used in the ZIP compression is made configurable by the user (a speed vs compression ratio trade-off). This could be beneficial, for example, to produce as small packages as possible for Lambda functions.
Use Case
ZIP files produced as CDK assets (e.g., bundled JS Lambda code/sourcemaps) are larger than they could be.
Proposed Solution
Expose the level setting of zlib, which is exposed by the archiver library which seems to be used by CDK for ZIP packages (see https://www.npmjs.com/package/archiver)
Other Information
No response
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
CDK version used
2.43.1
Environment details (OS name and version, etc.)
macOS 12.5.1