forked from TrueCloudLab/frostfs-node
[#868] blobstor: allow to decompress objects on-the-fly
We should be able to read whatever we have written earlier. Compression setting applies only to the new objects. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
cc377b34d2
commit
dd678cd976
3 changed files with 105 additions and 10 deletions
|
@ -4,6 +4,10 @@ import (
|
|||
"github.com/klauspost/compress/zstd"
|
||||
)
|
||||
|
||||
// zstdFrameMagic contains first 4 bytes of any compressed object
|
||||
// https://github.com/klauspost/compress/blob/master/zstd/framedec.go#L58 .
|
||||
var zstdFrameMagic = []byte{0x28, 0xb5, 0x2f, 0xfd}
|
||||
|
||||
func noOpCompressor(data []byte) []byte {
|
||||
return data
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue