atomicobject / heatshrink

data compression library for embedded/real-time systems
ISC License
1.31k stars 176 forks source link

Indexing for a 15-bit window encoder does not work #86

Open sameer opened 3 months ago

sameer commented 3 months ago

Hello,

Just thought I should report something I noticed.

The index initialization end exceeds the maximum size of a 16-bit signed integer when the window sized is 15 bits. The input offset is 32768 and cannot be represented in the index table.

The cast from unsigned to signed in the array init loop makes it negative (?) so I don't think it runs.