-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathcompression.go
More file actions
20 lines (15 loc) · 876 Bytes
/
compression.go
File metadata and controls
20 lines (15 loc) · 876 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// -----------------------------------------------------------------------------
// github.com/balacode/udpt /[compression.go]
// (c) balarabe@protonmail.com License: MIT
// -----------------------------------------------------------------------------
package udpt
// Compression implements functions to compress and uncompress byte slices.
type Compression interface {
// Compress compresses 'data' and returns the compressed bytes.
// If there was an error, returns nil and the error instance.
Compress(data []byte) ([]byte, error)
// Uncompress uncompresses bytes and returns the uncompressed bytes.
// If there was an error, returns nil and the error instance.
Uncompress(comp []byte) ([]byte, error)
} // Compression
// end