IP Library Granted Patent US 10,419,022
Granted Patent B2
US 10,419,022 · App. 15/828,385 · Granted Sep 17, 2019

Run-length base-delta encoding for high-speed compression

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,419,022
App. No.
15/828,385
Granted
Sep 17, 2019
Kind
B2
Abstract

A method, computer system, and a computer program product for high-speed data compression is provided. The present invention may include receiving an input stream. The present invention may include selecting a header based on the received input stream, wherein the header includes a base, a scheme and a delta count. The present invention may include determining whether there are any remaining values in an uncompressed input stream. The present invention may include reading a first next value from the input stream. The present invention may include determining whether the read first next value is representable with a current base scheme. The present invention may include calculating the delta count based on determining that the read first next value is representable with the current base scheme. The present invention may include writing the calculated delta count to the selected header. The present invention may include incrementing the written delta count.

Claims (111)

1. A method for high-speed data compression, the method comprising:

receiving, by a computer, an input stream;

selecting, by the computer, a header based on the received input stream, wherein the header includes a base, a scheme and a delta count, wherein the delta count is used to select a compression scheme;

determining, by the computer, a plurality of remaining values in an uncompressed input stream based on the selected header;

reading, by the computer, a first next value from the input stream;

determining, by the computer, the read first next value is representable with a current base scheme;

calculating, by the computer, the delta count based on determining the read first next value is representable with the current base scheme;

writing, by the computer, the calculated delta count to the selected header; and

incrementing, by the computer, the written delta count.

2. The method of claim 1 , further comprising:

reading a second next value from an incremented delta count;

determining the read second next value is not representable with the current base scheme;

writing the base, the scheme and a second next delta count based on the read second next value;

determining there are no remaining second next values in the uncompressed input stream based on the written base, the written scheme and the written second next delta count; and

decompressing the current base scheme based on determining there are no remaining second next values in the uncompressed input stream.

3. The method of claim 2 , wherein decompressing the current base scheme further comprises:

initializing a plurality of bytes read to zero;

determining the initialized plurality of bytes does not equal a compressed size;

reading the header based on the initialized plurality of bytes;

writing the base to a second output stream based on the read header;

determining the delta count is greater than zero based on the written base;

reading the delta size from a compressed input stream based on determining the delta count is greater than zero; and

writing a base plus delta to an output based on the read delta size.

4. The method of claim 2 , wherein decompressing the current base scheme further comprises:

initializing a plurality of bytes read to zero;

determining the initialized plurality of bytes does not equal a compressed size;

reading the header based on the initialized plurality of bytes;

writing the base to a second output stream based on the read header; and

determining the delta count is zero based on the written base.

5. The method of claim 2 , wherein decompressing the current base scheme further comprises:

initializing a plurality of bytes read to zero; and

determining the initialized plurality of bytes equals a compressed size.

6. The method of claim 1 , wherein a compress-transfer-decompress pipeline (CTDP) process is used to break a large data set transmitted between a computer memory and an accelerator device memory into a plurality of smaller data chunks.

7. The method of claim 6 , wherein the CTDP process further comprises;

dividing a plurality of data into the plurality of smaller data chunks;

compressing the divided plurality of data using a run-length base-delta compression algorithm;

transferring the compressed plurality of data to a target;

decompressing the transferred plurality of data using the run-length base-delta compression algorithm to recover the transferred plurality of data; and

reassembling the decompressed plurality of data on a device.

8. The method of claim 7 , wherein the target includes a graphics processing unit (GPU) or a computing device with a separate memory.

9. A computer system for high-speed data compression, comprising:

one or more processors, one or more computer-readable memories, one or more computer-readable tangible storage medium, and program instructions stored on at least one of the one or more tangible storage medium for execution by at least one of the one or more processors via at least one of the one or more memories, wherein the computer system is capable of performing a method comprising:

receiving, by a computer, an input stream;

selecting, by the computer, a header based on the received input stream, wherein the header includes a base, a scheme and a delta count, wherein the delta count is used to select a compression scheme;

determining, by the computer, a plurality of remaining values in an uncompressed input stream based on the selected header;

reading, by the computer, a first next value from the input stream;

determining, by the computer, the read first next value is representable with a current base scheme;

calculating, by the computer, the delta count based on determining the read first next value is representable with the current base scheme;

writing, by the computer, the calculated delta count to the selected header; and

incrementing, by the computer, the written delta count.

10. The computer system of claim 9 , further comprising:

reading a second next value from an incremented delta count;

determining the read second next value is not representable with the current base scheme;

writing the base, the scheme and a second next delta count based on the read second next value;

determining there are no remaining second next values in the uncompressed input stream based on the written base, the written scheme and the written second next delta count; and

decompressing the current base scheme based on determining there are no remaining second next values in the uncompressed input stream.

11. The computer system of claim 10 , the base scheme decompression further comprising:

initializing a plurality of bytes read to zero;

determining the initialized plurality of bytes does not equal a compressed size;

reading the header based on the initialized plurality of bytes;

writing the base to a second output stream based on the read header;

determining the delta count is greater than zero based on the written base;

reading the delta size from a compressed input stream based on determining the delta count is greater than zero; and

writing a base plus delta to an output based on the read delta size.

12. The computer system of claim 10 , the base scheme decompression further comprising:

initializing a plurality of bytes read to zero;

determining the initialized plurality of bytes does not equal a compressed size;

reading the header based on the initialized plurality of bytes;

writing the base to a second output stream based on the read header; and

determining the delta count is zero based on the written base.

13. The computer system of claim 10 , the base scheme decompression further comprising:

initializing a plurality of bytes read to zero; and

determining the initialized plurality of bytes equals a compressed size.

14. The computer system of claim 9 , wherein a compress-transfer-decompress pipeline (CTDP) process is used to break a large data set transmitted between a computer memory and an accelerator device memory into a plurality of smaller data chunks.

15. The computer system of claim 14 , the CTDP process further comprising;

dividing a plurality of data into the plurality of smaller data chunks;

compressing the divided plurality of data using a run-length base-delta compression algorithm;

transferring the compressed plurality of data to a target;

decompressing the transferred plurality of data using the run-length base-delta compression algorithm to recover the transferred plurality of data; and

reassembling the decompressed plurality of data on a device.

16. The computer system of claim 15 , wherein the target includes a graphics processing unit (GPU) or a computing device with a separate memory.

17. A computer program product for high-speed data compression, comprising:

one or more computer-readable storage media and program instructions stored on at least one of the one or more tangible storage media, the program instructions executable by a processor to cause the processor to perform a method comprising:

receiving, by a computer, an input stream;

selecting, by the computer, a header based on the received input stream, wherein the header includes a base, a scheme and a delta count, wherein the delta count is used to select a compression scheme;

determining, by the computer, a plurality of remaining values in an uncompressed input stream based on the selected header;

reading, by the computer, a first next value from the input stream;

determining, by the computer, the read first next value is representable with a current base scheme;

calculating, by the computer, the delta count based on determining the read first next value is representable with the current base scheme;

writing, by the computer, the calculated delta count to the selected header; and

incrementing, by the computer, the written delta count.

18. The computer program product of claim 17 , further comprising:

reading a second next value from an incremented delta count;

determining the read second next value is not representable with the current base scheme;

writing the base, the scheme and a second next delta count based on the read second next value;

determining there are no remaining second next values in the uncompressed input stream based on the written base, the written scheme and the written second next delta count; and

decompressing the current base scheme based on determining there are no remaining second next values in the uncompressed input stream.

19. The computer program product of claim 17 , the base scheme decompression further comprising:

initializing a plurality of bytes read to zero;

determining the initialized plurality of bytes does not equal a compressed size;

reading the header based on the initialized plurality of bytes;

writing the base to a second output stream based on the read header;

determining the delta count is greater than zero based on the written base;

reading the delta size from a compressed input stream based on determining the delta count is greater than zero; and

writing a base plus delta to an output based on the read delta size.

20. The computer program product of claim 17 , the base scheme decompression further comprising:

initializing a plurality of bytes read to zero;

determining the initialized plurality of bytes does not equal a compressed size;

reading the header based on the initialized plurality of bytes;

writing the base to a second output stream based on the read header; and

determining the delta count is zero based on the written base.

Assignments (4)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 3, 2024
From: BEIJING PIANRUOJINGHONG TECHNOLOGY CO., LTD.
To: BEIJING ZITIAO NETWORK TECHNOLOGY CO., LTD.
Reel/Frame 066565/0952 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 4, 2023
From: AWEMANE LTD.
To: BEIJING PIANRUOJINGHONG TECHNOLOGY CO., LTD.
Reel/Frame 064501/0498 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 2, 2021
From: INTERNATIONAL BUSINESS MACHINES CORPORATION
To: AWEMANE LTD.
Reel/Frame 057991/0960 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 30, 2017
From: AMARAL, JOSE N.; BARTON, CHRISTOPHER M.; LLOYD, TAYLOR J.; TIOTTO, ETTORE
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 044269/0001 →