mdsteele / rust-icns

Rust library for encoding/decoding Apple Icon Image (.icns) files
MIT License
25 stars 10 forks source link

Cap literal runs at 128 bytes #4

Closed avidrissman closed 4 years ago

avidrissman commented 4 years ago

In the flavor of RLE encoding used, literal runs can only be 128 bytes long. (See https://en.wikipedia.org/wiki/Apple_Icon_Image_format .) Therefore, cap the literal runs at 128 rather than an incorrect 256.

mdsteele commented 4 years ago

Thanks for catching this!