You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am wondering whether it would be feasible for the mz_zip_writer_add_mem_ex_v2 API to only write the metadata associated with the file without requiring pBuf to be defined. In particular, allowing a nullptr for pBuf when buf_size is defined (i.e. compression level 0). Currently, this explicitly errors out here
In particular, I am wondering whether the function could write only the zipfile header and central directory entry (excluding CRC_32, which requires the pBuf)
The specific use case I have in mind is as such:
We know the size of the entry beforehand and we want to write the metadata associated with the entry in the zipfile while leaving enough empty space for the actual entry to be written later because the buffer is not available at the time we write the metadata.
If it is of interest, I can definitely share more details on my specific use case which relates to PyTorch’s FileWriter that uses miniz.
Would look forward to any feedback on whether the above makes sense and suggestions on how we can do this. If it sounds reasonable, I would be happy to submit the PR that does this! :)
The text was updated successfully, but these errors were encountered:
Hey
miniz
maintainers,I am wondering whether it would be feasible for the
mz_zip_writer_add_mem_ex_v2
API to only write the metadata associated with the file without requiringpBuf
to be defined. In particular, allowing anullptr
forpBuf
whenbuf_size
is defined (i.e. compression level 0). Currently, this explicitly errors out hereminiz/miniz_zip.c
Line 3236 in 16413c2
In particular, I am wondering whether the function could write only the zipfile header and central directory entry (excluding CRC_32, which requires the pBuf)
The specific use case I have in mind is as such:
We know the size of the entry beforehand and we want to write the metadata associated with the entry in the zipfile while leaving enough empty space for the actual entry to be written later because the buffer is not available at the time we write the metadata.
If it is of interest, I can definitely share more details on my specific use case which relates to PyTorch’s FileWriter that uses miniz.
Would look forward to any feedback on whether the above makes sense and suggestions on how we can do this. If it sounds reasonable, I would be happy to submit the PR that does this! :)
The text was updated successfully, but these errors were encountered: