1. Data can (already did) at any point, not only at specific, that you 
marks by '!'.
2. If packed record doesn't fit into one page, control sequence is 
parsed from end.
3. When rest of sequence will fit, compression is started again from 
beginning.
4. If fragment has odd length, zero is added.

if you will generate compressed buffer instead control sequence, you can use
any compress/encoding schema.
If you will store this compressed buffer in one or more fragments is it 
irrelevant.
You can join/splitting as you want. But for decompression  you have to 
collect all fragments into buffer.

Slavek

> 03.03.2016 18:34, Slavomir Skopalik wrote:
>> But value encoding cannot be implemented until we switch from fragment
>> compression to true record level compression.
> I was not speaking about any encoding, just about compacting the record.
>
> Fragments are not compressed independently. The whole record is being
> prepared for compression (control bytes are generated) and then splitted
> into multiple chunks accordingly to the control bytes, so that a single
> compressed sequence is not interrupted in the middle:
>
> 'aaaaoooiiiuee'
> {-4, 'a'} ! {-3, 'o'} ! {-3, 'i'} ! {1, 'u'} ! {2, 'ee'}
>
> This compressed sequence can be fragmented at any of the "!" points.
> This is needed to decompress them separately, without copying all the
> fragments into a single buffer before decompressing, i.e. fragment by
> fragment.
>
> But for the pack/unpack approach, we just copy data in chunks. Some
> field may have first N bytes stored in fragment 1 and the remaining M
> bytes stored in fragment 2. We know we need N+M bytes for the record. So
> we copy N bytes from fragment 1, release the page, fetch fragment 2 and
> continue copying N+1..M bytes into the record. Fragmenting is even
> easier than now, it can happen at any place.
>
> Am I missing something obvious?
>



------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to