Re:Show HN: Rust nom parsing Starcraft2 Replays into Arrow f...
by sebosp on Wednesday October 04, 2023 @04:23PM
(#37771164)
Is there a general name to the way the data is compressed/serialized in SC2 Replays? Yesterday somebody was talking about other ways to serialize/pack data with borsh but not sure it's at all similar...
Is the SC1 broodwar replay format similar with byte-alignment and bit "packing"?
BTW I call the parsers "bitpacked" or "byte-aligned", but I'm not sure what the right name for them is...
[ Parent
| on HN ]
Re:Show HN: Rust nom parsing Starcraft2 Replays into Arrow f...
by icza on Wednesday October 04, 2023 @04:39PM
(#37771403)
SC2 replays are MPQ files, which is a proprietary format created and used by Blizzard. It's an archive that may contain multiple files stored with different compression and optionally encrypted. I wrote a lib to parse MPQ files that embodies SC2Replays: https://github.com/icza/mpq. I also wrote an SC2 replay parser that is more or less a port of the official s2protocol: https://github.com/icza/s2prot
Re:Show HN: Rust nom parsing Starcraft2 Replays into Arrow f...
by sebosp on Wednesday October 04, 2023 @04:47PM
(#37771518)
I mean for example https://github.com/sebosp/s2protocol-rs/blob/755098fb86ab6b1... I hacked my way around the json protocol specification, an enum has n types, using log I can find the number of bits I need to read to uniquely identify each variant, that kind of serialization I wonder the name of.