Commit b4cba641 authored by Tianjie Xu's avatar Tianjie Xu
Browse files

Implement a new bsdiff format

Add a new BSDF2 format that allows compression of ctrl/diff/extra streams
with different algorithms. The compression algorithm supported for now is
bz2 and brotli. This new format is similar to the legacy "BSDIFF40" format
except for the magic headers.

File format:
0       8    magic header
8       8    X
16      8    Y
24      8    new_file_size
32      X    compressed control block
32+X    Y    compressed diff block
32+X+Y  ???  compressed extra block

The magic header for BSDF2 format:
0 5 BSDF2
5 1 compressed type for control stream
6 1 compressed type for diff stream
7 1 compressed type for extra stream

Bug: 34220646
Test: unittest pass
Change-Id: I6eb0867e88476dbc4a4b7be609783f8c8a0a41cd
parent 4d10c3ef
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment