Search code examples
javatruezip

Can TrueZip be used to seek through streams


Let's assume I have a large zip file on a server and I am interested in extracting just a subset from it over the HTTP. Is this possible with TrueZip and if yes, how? The idea is not to have to download the entire zip, but just the zip header, do some seeking and then extract the set of files from it.


Solution

  • As is, TrueZIP 7.7.3 does not support this.

    However, the TrueZIP Driver HTTP(S) is only a small wrapper around the Apache HttpsClient which does support this. Furthermore, TrueZIP does provide the necessary interface logic (which is used by other drivers, e.g. the TrueZIP Driver ZIP). So while currently not supported, it should be possible to implement this by enhancing the current implementation of the TrueZIP Driver HTTP(S).