46
Delta Encoding in the compressed domain A semi compressed domain scheme with a compressed output

Delta Encoding

  • Upload
    aden

  • View
    73

  • Download
    0

Embed Size (px)

DESCRIPTION

Delta Encoding . in the compressed domain. A semi compressed domain scheme with a compressed output. Agenda. Delta encoding types and schemes Applications The algorithm principles Results Similar works Contributions. The Problem. - PowerPoint PPT Presentation

Citation preview

Page 1: Delta Encoding

Delta Encoding

in the compressed domain

A semi compressed domain scheme with a compressed output

Page 2: Delta Encoding

Agenda• Delta encoding types and schemes• Applications• The algorithm principles• Results• Similar works• Contributions

Page 3: Delta Encoding

The Problem• We would like to have a

version updating algorithm which transforms a compressed reference into a compressed version without decoding and re-encoding a reference.

Page 4: Delta Encoding

What is “Delta Encoding”• Definition: Delta Encoding is

the task of compactly encoding a new version as a set of copy and add commands using a reference.

Page 5: Delta Encoding

Types Of Delta Encoding• Uncompressed domain

• Compressed domain

• Semi Compressed domain

• The proposed Semi Compressed domain with compressed output

Page 6: Delta Encoding

Why Semi Compressed Scheme

• Textual data is produced in an uncompressed form

• Digital data is first acquired then compressed for most cases

• This work focuses on the data network path

Page 7: Delta Encoding

Compression Base• We uses LZSS (Storer-

Syzmanski) as the compression base

• LZSS has (off,len) & strings mixed structure

• LZSS is a repetitions based algorithm (LZ family)

Page 8: Delta Encoding

Delta CompressionThe Schemes

Page 9: Delta Encoding

Uncompressed Domainversion

reference

Delta

Encoder

Decoder

Page 10: Delta Encoding

Compressed DomainVerc

Refc

Delta

Encoder

Decoder

version

Page 11: Delta Encoding

Semi Compressed Domainversion

Refc

Delta

Encoder

Decoder

version

Page 12: Delta Encoding

The Proposed Semi Compressed Domain With

Compressed Outputversion

Refc

Delta

Encoder

Decoder

Verc

Page 13: Delta Encoding

The Main Differences1. Delta file has additional new

commands

2. The decoder manipulates the compressed reference to become the compressed version

3. Decoder outputs the compressed version

Page 14: Delta Encoding

Applications• Forward and reverse proxies• Caching devices• Traffic accelerators• Server farming• Low bandwidth networks• Online storage & backups• Version & source control

All the intermediate devices do not use the data but only transfer it ! ! !

Page 15: Delta Encoding

Application – The Topology

Page 16: Delta Encoding

The Key Benefits• Eliminate the need to extract,

compare and re-encode reduction in CPU consumption

• Network Hop by Hop scheme of data caching.

• Reducing storage space• Reducing decompression

work space.

Page 17: Delta Encoding

The Algorithmic Steps For Each Scheme Type

Page 18: Delta Encoding

Uncompressed Domainstep Server Network Client

1 Decompress (Rc) R Decode (Rc) R Decode (Rc) R

2Delta Encode (R,V) Delta Decode (R, ) V Delta Decode (R, )

V

3 Compress (V) Vc Compress (V) VcCompress (V) Vc

4 Store Vc Rc’ Store Vc Rc’ Store Vc Rc’

5 Send Store

6 Store Send

Page 19: Delta Encoding

Compressed Domainstep Server Network Client

1 Compress (V) VcDelta Decode (Rc, )

VDelta Decode (Rc, ) V

2Delta Encode (Rc, Vc) Compress (V) Vc Compress (V) Vc

3 Store Vc Rc’Store Vc Rc’ Store Vc Rc’

4 Store Store

5 Send Send

6

Page 20: Delta Encoding

Semi Compressed Domain With Compressed Output

step Server Network Client

1Delta Encode (Rc, V)

Delta Decode (Rc, )

Vc

Delta Decode (Rc, ) Vc

2 Decode (Rc, ) Vc Store Vc Rc’Store Vc Rc’

3 Store Vc Rc’Store Decode (Vc) V

4 Store Send

5 Send

6

Page 21: Delta Encoding

The Algorithm Principles

Iterative Steps Of Encode And Compare

Local Reference Approach

Dependency chain breaking

Page 22: Delta Encoding

Constraints And Assumptions

1. Both versions are highly correlated

2. The changes are local and sparse3. The change size is very small

compared to the size of the version

4. We do not seek optimal solution but rather to show that there exist a comprehensive solution

Page 23: Delta Encoding

Ref : 1234567890(10,10)(10,20)

Ver :

1st Ver: 123456890123456789012345678901234567890

1234567890123466789012345678901234567890

123456789012345678901234567890 Local Reconstruction :

The Algorithm Principles(10, 4)

Page 24: Delta Encoding

The Algorithm Principles• How to detect mismatch type• How to handle a mismatch• Dependency chain breaking• Synchronizing the encoder to

continue encode and compare

Page 25: Delta Encoding

Version Fileindices

Reference Fileindices

1 2 3 4 5 6 7 … K’… (K+i)’ K+i+1… N

Mismatch point

DifferenceBlock Next Match

1 2 3 4 5 6 7 … K … (K+i) K+i+1 ...N

The Algorithm Principles - Replacement

• Determined by scanning forward both version and the temporary local reconstructed buffer

• Bounded by the change maximum length ( > i ) and by O ( I * synch )

Page 26: Delta Encoding

Version Fileindices

Reference Fileindices

1 2 3 4 5 6 7 … (K-j)…(K-1) K … (K+i) … N

1 2 3 4 5 6 7 … K … (K+i) … N

Mismatch point

InsertedBlock Next Match

The Algorithm Principles - Insertion

• Determined by version skipping and comparing to the temporary local reconstructed buffer

• Bounded by the change maximum length ( > j ) and by O ( j * synch )

Page 27: Delta Encoding

The Algorithm Principles - Deletion

• Determined by skipping forward in temporary local reconstructed buffer

• Bounded by the change maximum length ( > j ) and by O ( j * synch )

Version Fileindices

Reference Fileindices

1 2 3 4 5 6 7 … K+j ... (K+i) … N

Mismatch point

DeletedBlock Next Match

1 2 3 4 5 6 7 … K … (K+j-1) (K+j) ...(K+i) … N

Page 28: Delta Encoding

Handling A Mismatch• According to mismatch type

– Add or remove characters– Add or remove pointers– Split pointers into 3 parts

• Prefix – up to the change• The change• Postfix – after the change

Page 29: Delta Encoding

Handling A Mismatch - Example

Ref : 1234567890(10,10)(10,20)

Ver :

1st Ver: 123456890123456789012345678901234567890

1234567890123466789012345678901234567890

123456789012345678901234567890 Local Reconstruction :

(10, 4)

Output to Delta file : • SplitTo3 command for pointer

(10,10)• (10,4)• [ 6 ]• (10,5)

And we need to break the dependency chain of pointer (10,20)

Page 30: Delta Encoding

Handling A Mismatch - Advance• If the mismatch covers a

set of elements

– We will replace the entire section (pointers might be split and characters replaced)

– Break the dependency chain

Page 31: Delta Encoding

12345678901234xxxxxxx2345678901234567890

Handling A Mismatch - Advance

Ref : 1234567890

Ver :

1st Ver: 123456890123456789012345678901234567890 123456789012345678901234567890 Local Reconstruction :

(10, 4)

(10,10)(10,20)

change result to Delta file : 1. SplitTo3 command

1. (10,4)2. [ xxxxxx ]3. 0

4. SplitTo3 command4. 05. [ x ]6. (20,9)!(=CB)

Exceptional case: self pointer

For (10,20) we use the local reconstructed buffer to continue the reconstruction

7. ADDP (30,10)

Page 32: Delta Encoding

R c = 1234567890(10,10)(10,20)V c = 1234567890(10,4)xxxxxx(0,0)(0,0)x(20,9)(30,10)

Handling A Mismatch - Advance

V c = 1234567890(10,4)xxxxxxx(20,9)(30,10)

Delta File: (3 bit per command, offset = 16 bit , length = 8 bit )1. Copy [0,9]2. SplitTo3 (10,4) [xxxxxx] 03. SplitTo3 0 [x] (20,9)4. ADDP (30,10)

Total of 172bits

Re-encoding V produces 208 bits output1234567890(10,4)x(1,6)(10,3)(20,10)(10,6)Saving ~20% of the bits in this short sample

Page 33: Delta Encoding

Handling A Mismatch - LSP• LSP is calculated according

to the reference• LSP might be located

beyond the version’s change

• Encoder’s internal data structure synchronization

Page 34: Delta Encoding

Chain Breaking• A must, due to the repetition base

algorithmic nature of LZ based compressions

• Quarantines – restricted zones and change tags

• Pointer modifications are bounded by window size – first occurrence elimination

• Part of the encoder’s implementation (Hash, tags …)

Page 35: Delta Encoding

The Delta File Commands• COPY – instruct the decoder to

copy part of the reference• ADDP – Add a pointer to the

compressed version• ADDS – Same but adds a string

Page 36: Delta Encoding

The Delta File Commands• SplitTo3 – instruct the decoder

to break an element into 3 parts

• ADJUSTJP – instruct the decoder to adjust pointers offsets

• CTag ( optional )- Marks to the decoder a specific tagged change boundaries (uncompressed)

Page 37: Delta Encoding

The Decoder• Modifies the compressed

reference to become the compressed version

• Linear in time and space• Do not need temporary

decompression space

Page 38: Delta Encoding

The Decoder

R c = 1234567890(10,10)(10,20)

Delta File:1. Copy [0,9]2. SplitTo3 (10,4) [xxxxxx] 03. SplitTo3 0 [x] (20,9)4. ADDP (30,10)

V c =

1234567890

(10,4)xxxxxxx(20,9)(30,10)

Page 39: Delta Encoding

Results• Linear Time & Space

encoding/decoding

• Constant bound addition of compares (Locality)

• Throughput is very similar to base LZSS encoding/decoding

Page 40: Delta Encoding

Results

Page 41: Delta Encoding

Results

Page 42: Delta Encoding

Similar Works• T. Serebro - Modeling

delta encoding of compressed files (2006)

• S. Klein & D. Shapira - Compressed delta encoding for lzss encoded files (2007)

Page 43: Delta Encoding

Contributions• Comprehensive solution

Addresses insertion, deletion and replacement

• local reference approach – no right to left decoding

• CDELTA -New Delta File scheme

• Ongoing Dependency chain breaking

Page 44: Delta Encoding

Contributions• Utilization of textual data

being produced uncompressed • Network perspective -

devices along the path stores & forwards data (decoder compressed output)

• Implementation of the algorithms – a proof of concept

Page 45: Delta Encoding

Thank You

Page 46: Delta Encoding

Chain Breaking