forked from TrueCloudLab/frostfs-node
[#1523] blobstor: Unify fstree and blobovnicza interfaces
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
5aa3defc67
commit
266458fe5c
21 changed files with 157 additions and 183 deletions
|
@ -83,10 +83,10 @@ func (c *CConfig) Decompress(data []byte) ([]byte, error) {
|
|||
// Compress compresses data if compression is enabled
|
||||
// and returns data untouched otherwise.
|
||||
func (c *CConfig) Compress(data []byte) []byte {
|
||||
if c.Enabled {
|
||||
return c.encoder.EncodeAll(data, make([]byte, 0, len(data)))
|
||||
if c == nil || !c.Enabled {
|
||||
return data
|
||||
}
|
||||
return data
|
||||
return c.encoder.EncodeAll(data, make([]byte, 0, len(data)))
|
||||
}
|
||||
|
||||
// Close closes encoder and decoder, returns any error occured.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue