decoders

package
v3.82.2 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fuzz

func Fuzz(data []byte) int

Fuzz is an entrypoint for go-fuzz, which is an AFL-style fuzzing tool. This one attempts to uncover any panics during decoding.

Types

type Base64 added in v3.3.0

type Base64 struct{}

func (*Base64) FromChunk added in v3.3.0

func (d *Base64) FromChunk(chunk *sources.Chunk) *DecodableChunk

func (*Base64) Type added in v3.81.9

func (d *Base64) Type() detectorspb.DecoderType

type DecodableChunk added in v3.60.2

type DecodableChunk struct {
	*sources.Chunk
	DecoderType detectorspb.DecoderType
}

DecodableChunk is a chunk that includes the type of decoder used. This allows us to avoid a type assertion on each decoder.

type Decoder

type Decoder interface {
	FromChunk(chunk *sources.Chunk) *DecodableChunk
	Type() detectorspb.DecoderType
}

func DefaultDecoders

func DefaultDecoders() []Decoder

type EscapedUnicode added in v3.68.5

type EscapedUnicode struct{}

func (*EscapedUnicode) FromChunk added in v3.68.5

func (d *EscapedUnicode) FromChunk(chunk *sources.Chunk) *DecodableChunk

func (*EscapedUnicode) Type added in v3.81.9

type UTF16 added in v3.32.0

type UTF16 struct{}

func (*UTF16) FromChunk added in v3.32.0

func (d *UTF16) FromChunk(chunk *sources.Chunk) *DecodableChunk

func (*UTF16) Type added in v3.81.9

func (d *UTF16) Type() detectorspb.DecoderType

type UTF8 added in v3.17.0

type UTF8 struct{}

func (*UTF8) FromChunk added in v3.17.0

func (d *UTF8) FromChunk(chunk *sources.Chunk) *DecodableChunk

func (*UTF8) Type added in v3.81.9

func (d *UTF8) Type() detectorspb.DecoderType

Jump to

Keyboard shortcuts

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