Name: gzran
Owner: CoreOS
Description: gzip indexer for random access into compressed files
Created: 2015-03-11 17:41:34.0
Updated: 2018-05-18 01:55:09.0
Pushed: 2018-01-04 20:27:06.0
Homepage: null
Size: 9857
Language: Go
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Gzran is a package that reads arbitrary offsets of uncompresssed data from
compressed gzip files. This is accomplished by first inflating a file and
saving decompressor state into memory. Then, the built index can be used with
the Extract
function to read from the compressed file without fully inflating
the file.
Gzran is based on the c library, zran, by Mark Adler: https://github.com/madler/zlib/blob/master/examples/zran.c
err := gzran.BuildIndex(gzippedFileName)
rr != nil {
panic(err)
rr := gzran.Extract(gzippedFileName, idx, fileOffset, readLength)
rr != nil && err != io.EOF {
panic(err)