compress

package
v0.11.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package compress implements compression related utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compress

func Compress(inBytes []byte) ([]byte, error)

Compress compresses the given bytes and encodes them into a string.

Types

type CompressionBuffer

type CompressionBuffer struct {
	// contains filtered or unexported fields
}

CompressionBuffer stores the data that is ready to be compressed.

func NewCompressionBuffer

func NewCompressionBuffer(inctx context.Context, callback func([]byte), batchSize int, l *logger.Logger) *CompressionBuffer

NewCompressionBuffer returns a new compression buffer.

func (*CompressionBuffer) Close

func (c *CompressionBuffer) Close()

Close compresses the buffer and flushes it to the output channel.

func (*CompressionBuffer) WriteLineToBuffer

func (c *CompressionBuffer) WriteLineToBuffer(line string)

WriteLineToBuffer writes the given line to the buffer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL