go-toolkit
go-toolkit copied to clipboard
Fixes for inefficient reads of ZIP entries
For the sake of https://github.com/readium/cli/issues/27
- Fixes bugged
Readcalls that aren't obligated to return the entirety of a resource - Add zran-like reading of ZIP entries. This only applies to the start offset, not the total length of the resources. Particularly useful for e.g. streaming videos where a browser will send
Range: bytes=0-then abort when satisfied, which is already hopeless for us to handle. At least when users scrub through video/audio, we can take aRange: bytes=XXXXXX-header and start the remote range request for the resource at the start of the byte range. - Add CRC32 checksum function for
CompressedResourceto make direct copying of compressed resources to new archives easier
Still getting ERROR failed streaming asset error="resource: error 500: flate: corrupt input before offset 5", need to fix that before this becomes a proper PR because there's a bug somewhere