garydgregory commented on PR #428: URL: https://github.com/apache/commons-codec/pull/428#issuecomment-4217766433
> > I am not sure this needs to be that general an API that needs to deal with all of `byte[]`, `Path`, and `InputStream`. I would either: > > > > * Base general input processing using IO's `builder` package, or > > * Pair down the API to only what the Maven plugin needs for build attestations. > > > > WDYT? > > I would rather not add a dependency on IO at this point, but I would like to handle at least two use cases: > > * Computing `treeId` of a `Path`, which is what I use in the Maven plugin. All the `blobId` methods are currently not useful and they could be private, but I think exposing them gives a bigger picture. > * Computing the id of a TAR or ZIP archive with decompressing them. For this I only need `treeIdBuilder`, `addDirectory` and `addFile(FileMode, String, long, InputStream)`. This is because archive formats usually have the uncompressed size of the content, which makes computation more efficient. > > We can probably remove the methods with `byte[]` and `InputStream` without a length. OK, then let's reduce the public footprint to only what's needed for the Maven plugin. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
