Skip to content

Conversation

@chocolatkey
Copy link
Member

@chocolatkey chocolatkey commented Oct 14, 2025

Fixes readium/cli#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 compressed 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 closer to the start of the byte range. This happens in increments of 1MB
  • 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

@readium readium deleted a comment from Copilot AI Dec 4, 2025
@chocolatkey chocolatkey marked this pull request as ready for review December 4, 2025 10:20
@chocolatkey
Copy link
Member Author

chocolatkey commented Dec 4, 2025

All that needs to be done is using a readium repo for gzran (which will become zran)

@chocolatkey chocolatkey merged commit 1a7f1ca into develop Dec 4, 2025
4 checks passed
@chocolatkey chocolatkey deleted the improve-inefficient-reads branch December 4, 2025 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Server struggles with remote streaming of compressed video/audio

2 participants