Encoding and decoding delta values
AssigneeGoogle Inc.
InventorsUlas Kirazci, Justin Foutts
Life of this patent
Estimating the term…
Abstract
Methods, systems, and apparatus, including computer programs encoded on a computer storage medium, for encoding and decoding delta values. In one aspect, a method includes accessing a compression buffer having a start position, a sentinel position, and a data storage region; obtaining a first value; determining that a second value stored in the sentinel position does not match a first sentinel value; determining that a third value stored in the start position matches a second sentinel value; and storing the first value at the start position of the compression buffer.
Claims13
A method performed by a data processing apparatus, the method comprising:
- accessing a first compression buffer that is full or almost full;
- allocating a second compression buffer that has a start position, a sentinel position, and a data storage region that is larger than the first compression buffer;
- copying each of multiple values stored in the first compression buffer into each of multiple contiguous positions of the second compression buffer in the data storage region;
- storing (i) an unsigned value to the sentinel position of the second compression buffer, and (ii) an address to the start position of the second compression buffer that corresponds to an outermost one of the multiple contiguous positions of the second compression buffer in the data storage region;
- obtaining a first uncompressed value;
- accessing a particular value stored in a position of the second compression buffer that corresponds to the address stored in the start position of the second compression buffer;
- generating a first compressed value by subtracting the first uncompressed value from the particular value;
- and
- storing (i) the first compressed value in the position of the second compression buffer that corresponds to the address stored in the start position of the second compression buffer in place of the particular value, and (ii) the first uncompressed value in a position of the second compression buffer adjacent to that which corresponds to the address stored in the start position of the second compression buffer in place of the particular value.
A method performed by a data processing apparatus, the method comprising:
- accessing a compression buffer having a start position, a sentinel position, and a data storage region;
- obtaining a first uncompressed value;
- determining that an unsigned value is stored in the sentinel position of the compression buffer;
- determining that an address stored in the start position of the compression buffer corresponds to a first position of the compression buffer that is not located at the end of the data storage region of the compression buffer;
- in response to determining that the unsigned value is stored in the sentinel position of the compression buffer and determining that the address stored in the start position of the compression buffer corresponds to the first position of the compression buffer:
- generating a first compressed value by subtracting (i) the first uncompressed value from (ii) a particular value stored in the first position of the compression buffer that corresponds to the address stored in the start position of the compression buffer;
- selecting a second position of the compression buffer by subtracting (i) a size of the first uncompressed value from (ii) the first position of the compression buffer that corresponds to the address stored in the start position of the compression buffer;
- and
- storing (i) the first compressed value in place of the particular value in the first position of the compression buffer that corresponds to the address stored in the start position of the compression buffer, and (ii) the first uncompressed value in the second position of the compression buffer.
A system comprising:
- a data processing apparatus;
- and
- a data store storing instructions that, when executed by the data processing apparatus, cause the data processing apparatus to perform operations comprising:
- accessing a first compression buffer that is full or almost full;
- allocating a second compression buffer that has a start position, a sentinel position, and a data storage region that is larger than the first compression buffer;
- copying each of multiple values stored in the first compression buffer into each of multiple contiguous positions of the second compression buffer in the data storage region;
- storing (i) an unsigned value to the sentinel position of the second compression buffer, and (ii) an address to the start position of the second compression buffer that corresponds to an outermost one of the multiple contiguous positions of the second compression buffer in the data storage region;
- obtaining a first uncompressed value;
- accessing a particular value stored in a position of the second compression buffer that corresponds to the address stored in the start position of the second compression buffer;
- generating a first compressed value by subtracting the first uncompressed value from the particular value;
- and
- storing (i) the first compressed value in the position of the second compression buffer that corresponds to the address stored in the start position of the second compression buffer in place of the particular value, and (ii) the first uncompressed value in a position of the second compression buffer adjacent to that which corresponds to the address stored in the start position of the second compression buffer in place of the particular value.
Dependencies are inferred from the claim text.