|Subject||Re: [IB-Architect] Next ODS change (was: System table change)|
> From: Ann Harrison:RLE compression in IB is able to map maximally 128 repeating bytes into 2 bytes
> What InterBase currently uses is a run-length compression which is
> cheap to compute. It uses a signed byte to indicate length. A positive
> value of <n> shows that the next <n> characters are part of the record.
> A negative value of <n> shows that the next character (byte value) should
> be repeated <n> times.
> If the length indicator were a word, an empty varchar(32000) would be
> stored as three bytes, rather than the current 300 or so.
(-128 and the character), so the best achievable compression ratio is 1:64.
It means empty 32000 CHAR will occupy exactly 500 bytes (nice number to remember).
VARCHAR (besides 2 bytes for string length) can be even longer because
IB will not fill rest of string by zeroes (or spaces) when UPDATEing it.