(data []byte)
| 506 | } |
| 507 | |
| 508 | func (l lz4Compressor) Decode(data []byte) ([]byte, error) { |
| 509 | if len(data) < sizeOfUint32 { |
| 510 | return nil, fmt.Errorf("unable to read compressed data length; expected at least %d bytes, got %d", |
| 511 | sizeOfUint32, len(data)) |
| 512 | } |
| 513 | decompressedLen := binary.BigEndian.Uint32(data) |
| 514 | decompressed := make([]byte, decompressedLen) |
| 515 | _, err := lz4.UncompressBlock(data[sizeOfUint32:], decompressed) |
| 516 | return decompressed, err |
| 517 | } |
| 518 | |
| 519 | func connectTestClient(t *testing.T, ctx context.Context, proxyContactPoint string) *proxycore.ClientConn { |
| 520 | cl, err := proxycore.ConnectClient(ctx, proxycore.NewEndpoint(proxyContactPoint), proxycore.ClientConnConfig{}) |
no outgoing calls
no test coverage detected