-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add custom ZIP writer support for WriteToBuffer function #2200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR. I've left some comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll made some changes based on your branch.
- Add new ZipWriter data type - Add new field ZipWriter in the File data type - Made the CharsetTranscoder function parameter not use the internal data type charsetTranscoderFn - Update unit tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the third-party archive package kzip you mentioned reduce 25% time cost, but the size of generated workbook will be increase over 100%.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2200 +/- ##
=======================================
Coverage 99.24% 99.24%
=======================================
Files 32 32
Lines 30571 30574 +3
=======================================
+ Hits 30340 30343 +3
Misses 153 153
Partials 78 78
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
PR Details
Description
Added
WriteToBufferCustomZIP
method, which allows using a custom ZIP library (e.g.,github.com/klauspost/compress/zip
) for better performance while keeping the originalWriteToBuffer
method backward-compatible.ZipWriter
interface to abstract standard and custom ZIP writers.WriteToBuffer
now callsWriteToBufferCustomZIP
with the standard libraryzip.NewWriter
by default.writeToZip
method updated to acceptZipWriter
interface.Related Issue
#2199
Motivation and Context
To improve in-memory write performance and support high-performance third-party ZIP libraries while maintaining compatibility with the standard library.
How Has This Been Tested
write a benchmark test for testing performance
Types of changes
Checklist