(data []byte, compressType byte)
| 125 | } |
| 126 | |
| 127 | func DecompressBlockData(data []byte, compressType byte) ([]byte, error) { |
| 128 | switch compressType { |
| 129 | case COMPRESS_TYPE_ZLIB: |
| 130 | return ZLibDecompress(data) |
| 131 | default: |
| 132 | return nil, fmt.Errorf("unknown compress type") |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | func ZLibCompress(data []byte) ([]byte, error) { |
| 137 | buf := bytes.NewBuffer(nil) |
no test coverage detected