go-toolkit icon indicating copy to clipboard operation
go-toolkit copied to clipboard

Fixes for inefficient reads of ZIP entries

Open chocolatkey opened this issue 1 month ago • 0 comments

For the sake of https://github.com/readium/cli/issues/27

  • Fixes bugged Read calls 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 a Range: bytes=XXXXXX- header and start the remote range request for the resource at the start of the byte range.
  • Add CRC32 checksum function for CompressedResource to 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

chocolatkey avatar Oct 14 '25 04:10 chocolatkey