新TAP测试(TODO 解析arp)

This commit is contained in:
黄思敏 2022-09-01 16:26:54 +08:00
parent eb4399c882
commit 803f62c634

View File

@ -12,6 +12,7 @@ var encoder, _ = zstd.NewWriter(nil)
// Compress a buffer.
// If you have a destination buffer, the allocation in the call can also be eliminated.
func Compress(src []byte) []byte {
return src
return encoder.EncodeAll(src, make([]byte, 0, len(src)))
}
@ -22,6 +23,7 @@ var decoder, _ = zstd.NewReader(nil, zstd.WithDecoderConcurrency(0))
// Decompress a buffer. We don't supply a destination buffer,
// so it will be allocated by the decoder.
func Decompress(src []byte) ([]byte, error) {
return src, nil
return decoder.DecodeAll(src, nil)
}