I'm reading the Firebird Internals pdf documentation and feel puzzled about the 
encoding of two repeating bytes.

"You may have noticed that the two consecutive characters 'DD' did not get 
compressed. Compression only takes place when there are three or more identical 
characters."

Indeed the pdf shows example data as:

01 fe fd 00 03 20 00 41 fc 61 01 42 f7 62 01 43 f2 63  { 02 44 44 }  bc 00

and the sequence "DD" which I placed between { } looks encoded as "those next 2 
bytes as is".

Why isn't this encoded as {ff 44} which is not shorter than the initial data, 
but at least is not larger.

I'm sure I'm facing some blatant evidence here, but it did not yet strike on me.
Help! What did I misunderstand?

— 
Olivier Mascia







------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to