Skip to content

Streaming get headers#32

Open
fcaps wants to merge 2 commits into
beyond-all-reason:masterfrom
fcaps:streaming_get_headers
Open

Streaming get headers#32
fcaps wants to merge 2 commits into
beyond-all-reason:masterfrom
fcaps:streaming_get_headers

Conversation

@fcaps

@fcaps fcaps commented Feb 7, 2026

Copy link
Copy Markdown
Contributor

Hey,

a working slimfit version of skipPackets, it has no statistics (and no winningTeam), but it is fast and could run on a casio watch.
Sadly the statistics-packets are at the end of the file and we would need to decompress the whole file for the winning team, but this is a start imo. related #30

closes: #30

Cheers

PS: I directly branched from #31 , so you need to only review the second commit here

  Streaming decompression approach that stops after reading the header and
  script, skipping the demo stream and statistics entirely. 4-25x faster
  and up to 92% less memory than skipPackets on tested replays.

  Deduplicates header parsing into a shared static parseHeader method.
  Does not include winningAllyTeamIds or statistics (requires full file).
@fcaps fcaps force-pushed the streaming_get_headers branch from 85a8e1f to 146887c Compare February 12, 2026 00:21

@p2004a p2004a left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't streaming decompression but it duplicates a bunch of code to extract header only. It doesn't close #30 which also targets lowering overall memory usage and unblocking the even loop a bit during decompression.

I don't think there is urgency to merge this workaround instead of reworking the rest of the implementation properly.

@fcaps

fcaps commented Feb 21, 2026

Copy link
Copy Markdown
Contributor Author

Yeah, i was kinda only using it for my use-case: fast indexing/filtering demofiles without the commands, but if your current indexer (BAR-DB?) has no issues with keeping up, then for sure, reworking it all would make more sense. For me the memory usage when processing the whole demofile is negligible, since i have to hold all used messages in memory anyways for later usage.

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.

Switch to streaming decompression

2 participants