github.com/MetalBlockchain/metalgo@v1.11.9/utils/compression/compressor.go (about) 1 // Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. 2 // See the file LICENSE for licensing terms. 3 4 package compression 5 6 // Compressor compresss and decompresses messages. 7 // Decompress is the inverse of Compress. 8 // Decompress(Compress(msg)) == msg. 9 type Compressor interface { 10 Compress([]byte) ([]byte, error) 11 Decompress([]byte) ([]byte, error) 12 }