archivex

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package archivex lists and reads members of zip-shaped containers (zip, cbz, epub) with the standard library only, so hosted builds stay possible. RAR/7z listing is Ether's side of the container pattern; plugins declare members, Ether extracts bytes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NaturalLess

func NaturalLess(a, b string) bool

NaturalLess compares names with embedded numbers compared numerically.

func ReadMember

func ReadMember(data []byte, name string) ([]byte, error)

ReadMember returns one member's bytes by exact name.

Types

type Member

type Member struct {
	Index int // position among non-directory members, archive order
	Name  string
	Size  int64
}

Member is one non-directory entry in archive order.

func List

func List(data []byte) ([]Member, error)

List returns the non-directory members of a zip-shaped archive.

func ListNatural

func ListNatural(data []byte) ([]Member, error)

ListNatural is List sorted the way readers order pages (1, 2, 10).

func ReadMemberAt

func ReadMemberAt(data []byte, index int) ([]byte, Member, error)

ReadMemberAt returns the nth non-directory member's bytes (0-based).

Jump to

Keyboard shortcuts

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