(data []byte, compressType byte)
| 116 | } |
| 117 | |
| 118 | func CompressBlockData(data []byte, compressType byte) ([]byte, error) { |
| 119 | switch compressType { |
| 120 | case COMPRESS_TYPE_ZLIB: |
| 121 | return ZLibCompress(data) |
| 122 | default: |
| 123 | return nil, fmt.Errorf("unknown compress type") |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | func DecompressBlockData(data []byte, compressType byte) ([]byte, error) { |
| 128 | switch compressType { |
no test coverage detected