classify

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(path, rel string, raw []byte) domain.Unit

Decode inspects BOM and charset. Bytes are kept as-is (UTF-8 assumed).

func IsBinary

func IsBinary(buf []byte) bool

Identifies if buf appears to be a binary file (indicating a NUL byte in the display window).

func KindOf

func KindOf(path string, raw []byte) (kind domain.Kind, skip bool)

KindOf classifies a file for the three-layer pipeline. skip is true for unknown binaries that must not be decoded as text.

func LanguageFromPath

func LanguageFromPath(path string) domain.Language

LanguageFromPath maps a file extension to a language.

func TextPayload

func TextPayload(u domain.Unit) bool

TextPayload reports whether Unicode / stamp / text-C2PA detectors should run.

Types

This section is empty.

Jump to

Keyboard shortcuts

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