@@ -117,8 +117,8 @@ compressed independently using LZSS with the following parameters:
|
||||
Streams are encoded as a sequence of 8‑item groups preceded by a flag byte:
|
||||
|
||||
- For each bit b (0..7) in the flag (LSB first):
|
||||
- If `(flag >> b) & 1 == 1`: Literal — copy next byte to output.
|
||||
- Else: Match — read two bytes b0, b1 and emit:
|
||||
- If `(flag >> b) & 1 == 1`: Literal - copy next byte to output.
|
||||
- Else: Match - read two bytes b0, b1 and emit:
|
||||
- `length = (b0 >> 4) + 3` (range 3..18)
|
||||
- `offset = ((b0 & 0x0F) << 8) | b1` (range 1..4095)
|
||||
- Copy length bytes from `out_size - offset`.
|
||||
|
Reference in New Issue
Block a user