新TAP测试(TODO 解析arp)
This commit is contained in:
parent
eb4399c882
commit
803f62c634
2
utils.go
2
utils.go
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user