1.2 KiB
1.2 KiB
sequenceDiagram
participant Encoder
participant File as "RLE File"
participant Decoder
Encoder->>File: write header (Type, Mode, ID, Size)
Encoder->>File: emit literal packet (count-1 + literals)
Encoder->>File: emit run packet (0x7D + N, byte or offset)
Encoder->>File: emit backref packet (0x7E + len, distance-1)
File->>Decoder: provide packet stream
Decoder->>Decoder: if control < 0x80 → copy (control+1) literals
Decoder->>Decoder: else → read param; if run → repeat byte; if backref → copy from output buffer
Decoder-->>File: produce decompressed bytes (output)
sequenceDiagram
participant Encoder
participant File as "RLE File"
participant Decoder
Encoder->>File: write header (Type, Mode, ID, Size)
Encoder->>File: emit literal packet (count-1 + literals)
Encoder->>File: emit run packet (0x7D + N, byte or offset)
Encoder->>File: emit backref packet (0x7E + len, distance-1)
File->>Decoder: provide packet stream
Decoder->>Decoder: if control < 0x80 → copy (control+1) literals
Decoder->>Decoder: else → read param; if run → repeat byte; if backref → copy from output buffer
Decoder-->>File: produce decompressed bytes (output)