[#1060] blobstor: allow to disable compression based on content-type

For some data compression makes little sense, as it is already compressed.
This commit allows to leave such data unchanged based on `Content-Type`
attribute. Currently exact, prefix and suffix matching are supported.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-01-10 15:46:01 +03:00 committed by Alex Vanin
parent 0f1eb743af
commit 0d969d7a06
11 changed files with 133 additions and 8 deletions

View file

@ -125,7 +125,7 @@ func (c *cache) flushBigObjects() {
return nil
}
if _, err := c.blobstor.PutRaw(addr, data); err != nil {
if _, err := c.blobstor.PutRaw(addr, data, true); err != nil {
c.log.Error("cant flush object to blobstor", zap.Error(err))
return nil
}