On Sun, 19 Mar 2023 14:50:41 GMT, Eirik Bjorsnos <d...@openjdk.org> wrote:

>> ZipOutputStream currently writes directory entries using the DEFLATED 
>> compression method. This does not strictly comply with the APPNOTE.TXT 
>> specification and is also about 10x slower than using the STORED compression 
>> method.
>> 
>> Because of these concerns, `ZipOutputStream.putNextEntry` should be updated 
>> with an `@apiNote` recommending
>> the use of the STORED compression method for directory entries.
>> 
>> Suggested CSR in the first comment.
>
> Eirik Bjorsnos has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Remove speculation that using DEFLATED for directory entries is not in 
> strict compliance with APPNOTE.txt

The example code works without setting the compressed size on the entry?

Looks like there is a check in ZipOutputStream::putNextEntry at
https://github.com/openjdk/jdk/blob/6cc4bb1169f34bc091cad3e2deec37cd5585e8d5/src/java.base/share/classes/java/util/zip/ZipOutputStream.java#L233

-------------

PR Comment: https://git.openjdk.org/jdk/pull/12899#issuecomment-1480394938

Reply via email to