Block-based compression
A method includes compressing data to generate compressed data having a first block size corresponding to a block-size requirement of a client device. The method further includes encrypting the compressed data to generate an encrypted data packet. The method further includes adding, by a processing device, a padding bit pattern to the encrypted data packet to generate a data block for storage, the data block having a second block size determined by a buffer size of a storage array.
1. A method, comprising:
compressing data to generate compressed data having a first block size corresponding to a block-size requirement of a client device wherein the block-size requirement is provided to the client device by the storage array;
encrypting the compressed data to generate an encrypted data packet; and
adding, by a processing device, a padding bit pattern to the encrypted data packet to generate a data block for storage, the data block having a second block size determined by a buffer size of a storage array.
2. The method of claim 1 , wherein the encrypted data packet fills a first portion of the data block, and wherein adding the padding bit pattern comprises filling a remaining portion of the data block.
3. The method of claim 2 , wherein the data block has a variable block size.
4. The method of claim 2 , wherein the data block has a block size of 4.5 kilobytes.
5. The method of claim 1 , further comprising adding metadata to the encrypted data packet, in addition to the padding bit pattern, to generate the data block for storage.
6. The method of claim 5 , wherein the metadata comprises a flag that indicates that the data is compressed.
7. The method of claim 5 , wherein the metadata comprises authentication data corresponding to the data.
8. The method of claim 5 , wherein the metadata comprises encryption information corresponding to the encrypted data packet.
9. The method of claim 5 , wherein the metadata comprises compression algorithm information corresponding to the compressed data.
10. An apparatus, comprising:
a memory to store data; and
a processing device, operatively coupled to the memory, the processing device to:
compress the data to generate compressed data having a first block size corresponding to a block-size requirement of a client device wherein the block-size requirement is provided to the client device by the storage array;
encrypt the compressed data to generate an encrypted data packet; and
add a padding bit pattern to the encrypted data packet to generate a data block for storage, the data block having a second block size determined by a buffer size of a storage array.
11. The apparatus of claim 10 , wherein the encrypted data packet fills a first portion of the data block, and wherein to add the padding bit pattern the processing device is to fill a remaining portion of the data block.
12. The apparatus of claim 11 , wherein the data block has a variable block size.
13. The apparatus of claim 11 , the processing device further to add metadata to the encrypted data packet, in addition to the padding bit pattern, to generate the data block for storage.
14. The apparatus of claim 13 , wherein the metadata comprises a flag that indicates that the data is compressed.
15. The apparatus of claim 13 , wherein the metadata comprises authentication data corresponding to the data.
16. The apparatus of claim 13 , wherein the metadata comprises encryption information corresponding to the encrypted data packet.
17. The apparatus of claim 13 , wherein the metadata comprises compression algorithm information corresponding to the compressed data.
18. A storage system, comprising:
a storage array comprising one or more storage devices; and
a storage array controller, operatively coupled to the storage array, the storage array controller to:
compress data to generate compressed data having a first block size corresponding to a block-size requirement of a client device wherein the block-size requirement is provided to the client device by the storage array;
encrypt the compressed data to generate an encrypted data packet; and
add a padding bit pattern to the encrypted data packet to generate a data block for storage, the data block having a second block size determined by a buffer size of the storage array.
19. The storage system of claim 18 , the storage array controller further to add metadata to the encrypted data packet, in addition to the padding bit pattern, to generate the data block for storage, wherein the metadata comprises encryption information corresponding to the encrypted data packet.