mirror of
https://github.com/luxfi/compress.git
synced 2026-10-30 16:59:35 +00:00
21 lines
427 B
Go
21 lines
427 B
Go
// Copyright (C) 2019-2025, Lux Industries, Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package compress
|
|
|
|
var _ Compressor = (*noCompressor)(nil)
|
|
|
|
type noCompressor struct{}
|
|
|
|
func (*noCompressor) Compress(msg []byte) ([]byte, error) {
|
|
return msg, nil
|
|
}
|
|
|
|
func (*noCompressor) Decompress(msg []byte) ([]byte, error) {
|
|
return msg, nil
|
|
}
|
|
|
|
func NewNoCompressor() Compressor {
|
|
return &noCompressor{}
|
|
}
|