Package zipserve implements serving virtual zip archives over HTTP,
with support for range queries and resumable downloads. Zipserve keeps only the
archive headers in memory (similar to archive/zip when streaming).
Zipserve fetches file data on demand from user-provided io.ReaderAt
or zipserve.ReaderAt
,
so the file data can be fetched from a remote location.
zipserve.ReaderAt
supports passing request context to the backing store.
The user has to provide CRC32 of the uncompressed data, compressed and uncompressed size of files in advance. These can be computed for example during file uploads.
- Deprecated FileHeader fields present in archive/zip (
CompressedSize
,UncompressedSize
,ModifiedTime
,ModifiedDate
) were removed in this package. This means the extended time information (unix timestamp) is always emitted. If you useModified
in archive/zip, the generated file should be identical.
- Package documentation: https://godoc.org/github.com/martin-sucha/zipserve
- ZIP format: https://support.pkware.com/display/PKZIP/APPNOTE
The module is stable and supports writing almost everything as archive/zip (see Differences to archive/zip
above),
so there aren't many commits. I update the module when a new version of Go is released or on request.
Three clause BSD (same as Go), see LICENSE.
- archive/zip if you only want to stream archives
- mod_zip module for nginx