shared

package
v0.0.0-...-dfe507c Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecompressBZip2

func DecompressBZip2(val []byte) ([]byte, error)

func DecompressZlib

func DecompressZlib(val []byte) ([]byte, error)

func GetListElement

func GetListElement(l *list.List, index int) (*list.Element, bool)

func PadBytes

func PadBytes(buf []byte, targetLen int) []byte

func SkipDecompress

func SkipDecompress(val []byte) ([]byte, error)

func ToMap

func ToMap[K comparable, T any](keys []K, vals []T) map[K]T

func UTF16ToUTF8

func UTF16ToUTF8(in []byte) string

func UTF8ToUTF16

func UTF8ToUTF16(utf8Bytes []byte) []byte

func WriteWithSum

func WriteWithSum(dest io.Writer, obj interface{}) (n int, sum uint32, err error)

WriteWithSum specifically objects which ends with Checksum field and writes to target by calculating adler32 sum

Types

type Decompressor

type Decompressor func(val []byte) ([]byte, error)

type EWFReader

type EWFReader interface {
	io.ReadSeeker
	io.ReaderAt
	Size() int64
	Metadata() map[string]interface{}
}

type EWFWriter

type EWFWriter interface {
	io.WriteCloser
}

type ZlibCompressor

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

func NewZlibCompressor

func NewZlibCompressor() (*ZlibCompressor, error)

func (*ZlibCompressor) Compress

func (c *ZlibCompressor) Compress(val []byte) ([]byte, error)

func (*ZlibCompressor) Reset

func (c *ZlibCompressor) Reset()

Jump to

Keyboard shortcuts

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