archivecheck

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package archivecheck validates bounded archive structure before native-client extraction.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalid = errors.New("invalid ZIP archive")

ErrInvalid identifies malformed or ambiguous archives that native clients could interpret differently from the registry's validated metadata.

Functions

func ZIP

func ZIP(ctx context.Context, r io.ReaderAt, size int64, limits ZIPLimits) (*zip.Reader, error)

ZIP validates both directory and physical entry layout before exposing files. Decompression keeps the standard library checksum checks and rejects hidden trailing data inside a deflate stream.

Types

type ZIPLimits

type ZIPLimits struct {
	ArchiveBytes   int64
	DirectoryBytes int64
	Entries        uint64
}

ZIPLimits bounds archive bytes and central-directory parsing allocations.

Jump to

Keyboard shortcuts

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