alpha
Login
or
Join now
mary.my.id
/
pkg-rar
Star
2
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
streaming RAR extractor
jsr.io/@mary/rar
jsr
Star
2
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
pkg-rar
/
lib
/
rar3
/
at
trunk
9 files
Mary
refactor: decode RAR3 LZSS symbols off a local bit accumulator
3mo ago
e24a76ed
block.ts
refactor: replace local crc32 with @mary/crc32
3 months ago
constants.ts
feat: add RAR3 block parser introduces lib/rar3/ with the constants (mark/main/file/sub/endArc block types, flag namespaces, host-OS and method codes) and a block walker that follows the legacy `Rar!\x1a\x07\x00` format used by RAR1.5 through RAR4. file and sub headers reuse the same on-disk layout where the LONG_BLOCK `add_size` field overlays the file header's compress_size, so the walker reads that field exactly once. header CRC verification is intentionally deferred — its per-block-type coverage range needs more work — but the smoke test in tests/rar3-block.test.ts confirms the walker handles 28 fixtures from the rarfile corpus, only skipping a misnamed RAR5 archive and a fixture with encrypted headers.
3 months ago
crypto.ts
feat: add structured error classes
3 months ago
dump.ts
feat: route compressed oldComments through v15/v20 LZSS `decodeOldComment` now dispatches on the subblock's version field: v15 goes through `decodeOldLzss15`, v20 (and v26) through `decodeOldLzss20`. unblocks four corpus fixtures whose archive-level comments were compressed: rar15-comment{,-lock}.rar (v15) and rar202-comment-{no,}psw.rar (v20). all four golden dumps now match byte-for-byte.
3 months ago
extract.ts
refactor: replace local crc32 with @mary/crc32
3 months ago
oldlzss.ts
feat: add structured error classes
3 months ago
ppmd.ts
feat: add structured error classes
3 months ago
sha1.ts
feat: implement RAR3 rarbug SHA-1 for >28-char passwords RARLAB's `rar3_s2k` runs a 0x40000-round SHA-1 over `wstr + salt` and extracts a 16-byte key/IV pair. when one update spans more than one SHA-1 block, RARLAB applies an in-place corruption: every full 64-byte block of the input aligned to the running hash boundary is overwritten with `W[64..79]` packed little-endian, using a circular-16-slot W expansion that does not match a normal 80-entry expansion. the corruption compounds across iterations because the same seed buffer is re-hashed in a tight loop. `Sha1.updateWithRar3Corruption` reproduces the quirk. `rar3DeriveKey` now routes seed updates through it, so passwords past 28 characters derive a key bit-exact with system `unrar`. shorter passwords (≤ 64-byte seeds) skip the corruption and behave like plain SHA-1. KDF correctness verified against rarfile's `test_rar3_s2k` vectors — the 29-character case hits the rarbug branch. an end-to-end fixture `rar3-long-password.rar` was hand-built (no RAR archiver is available in this environment), with system `unrar` used as an external oracle to confirm structural validity.
3 months ago
unpack.ts
refactor: decode RAR3 LZSS symbols off a local bit accumulator inline the Huffman decode and every bit read in runLzssBlock against a register-resident MSB-first accumulator seeded from the bit reader and collapsed back on exit, replacing the per-symbol peek16/skip method calls. the accumulator is private to one call, so parseCodes/PPMd/filters/ensureBytes still operate on the canonical addr/bit position.
3 months ago