On Wed, 19 Aug 2026 15:28:05 GMT, Alan Bateman <[email protected]> wrote:

> I'm just wondering about moving of the macros and whether there is a need for 
> any of these when using the API.

The usages of this utility library that I've seen in the JDK, mostly hide the 
ZIP details. This library is primarily used for things like, iterating over 
entries, getting an entry's size by its name, getting the decompressed content 
of an entry, decompressing the entire ZIP file. In neither of these, as far as 
I can see, the call sites have any interest in the ZIP specification details 
(which is what these macros are for). While at it, I just noticed that the 
header file continues to retain the `STORED` and `DEFLATED` macros. I don't 
remember why I left them here. I'll check my notes and if it's just an 
oversight, then I'll move them to the `.c` file too.

Given that these aren't currently used by any callers of the library, I thought 
it's a good chance to move it into the implementation, which is the only place 
where they are used right now, and thus avoid any future usages unless 
absolutely necessary.

Having said that, I see that Lance too suggests that moving this macros may not 
be necessary. So if the preference is to let them stay in the header file, I'll 
update the PR tomorrow accordingly.

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

PR Comment: https://git.openjdk.org/jdk/pull/32448#issuecomment-5345048313

Reply via email to