cabfile

package
v0.0.0-...-f9ac3a8 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2022 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Overview

Package cabfile provides a bare minimum implementation of a parser for the Microsoft Cabinet file format. Its goal is to support the feature set of Cabinet files produced by gcab for the LVFS project.

Normative references for this implementation are MS-CAB for the Cabinet file format and MS-MCI for the Microsoft ZIP Compression and Decompression Data Structure.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cabinet

type Cabinet struct {
	// contains filtered or unexported fields
}

Cabinet provides read-only access to Microsoft Cabinet files.

func New

func New(r io.ReadSeeker) (*Cabinet, error)

New returns a new Cabinet with the header structures parsed and sanity checked.

func (*Cabinet) Content

func (c *Cabinet) Content(name string) (io.Reader, error)

Content returns the content of the file specified by its filename as an io.Reader. Note that the entire folder which contains the file in question is decompressed for every file request.

func (*Cabinet) FileList

func (c *Cabinet) FileList() []string

FileList returns the list of filenames in the Cabinet file.

Jump to

Keyboard shortcuts

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