Versions in this module Expand all Collapse all v0 v0.1.0 Jul 25, 2026 Changes in this version + var ErrChecksumMismatch = errors.New("integrity check failed: payload checksum does not match") + var ErrFileTooLarge = errors.New("file too large for the format") + var ErrFilenameUnsafe = errors.New("stored filename is unsafe or contains directory traversal elements") + var ErrInputIsDir = errors.New("input is a directory, not a regular file") + var ErrInvalidDimensions = errors.New("invalid image dimensions") + var ErrNotPixPackImage = errors.New("not a PixPack image") + var ErrOutputExists = errors.New("output file already exists (use --overwrite to replace)") + var ErrPNGDecodeFailed = errors.New("failed to decode PNG image") + var ErrPNGEncodeFailed = errors.New("failed to encode PNG image") + var ErrTruncatedPayload = errors.New("truncated payload: image contains fewer bytes than declared") + var ErrUnsupportedImage = errors.New("unsupported or corrupted PixPack image") + func BytesToPixels(data []byte) []color.NRGBA + func CalculateDimensions(numPixels int, width int) (w, h int, err error) + func ConvertToNRGBA(img image.Image) *image.NRGBA + func CreateImage(data []byte, width int) (*image.NRGBA, error) + func PixelsToBytes(pixels []color.NRGBA, numBytes int) []byte + func ReadImageBytes(img *image.NRGBA, numBytes int) ([]byte, error) + func RequiredPixels(totalBytes int) int + type DecodeOptions struct + OutputPath string + Overwrite bool + type EncodeOptions struct + Overwrite bool + Width int + type Metadata struct + Filename string + Flags uint8 + Height int + PayloadSize uint64 + SHA256 [sha256.Size]byte + Version uint8 + Width int + func DecodeFile(inputPath string, opts DecodeOptions) (*Metadata, error) + func EncodeFile(inputPath, outputPath string, opts EncodeOptions) (*Metadata, error) + func InspectFile(inputPath string) (*Metadata, error) + func VerifyFile(inputPath string) (*Metadata, error)