gzipx

package
v0.3.41 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package gzipx provides a convenience wrapper for gzip encoding for reader and writer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(filename string, fun func(gzr io.Reader) error) error

Open opens given file and calls the given function on it, first detecting whether the filename has a .gz extension, and adding an gzip reader if so.

func OpenFS

func OpenFS(fsys fs.FS, filename string, fun func(gzr io.Reader) error) error

OpenFS opens given file from filesystem and calls the given function on it, first detecting whether the filename has a .gz extension, and adding a gzip reader if so.

func Read

func Read(r io.Reader, fun func(gzr io.Reader) error) error

Read adds a gzip reader to the given reader, and calls the given function with the unzip reader, returning the error from that function.

func Save

func Save(filename string, fun func(gzw io.Writer) error) error

Save opens given file and calls the given function on it, first detecting whether the filename has a .gz extension, and adding a gzip writer if so.

func Write

func Write(w io.Writer, fun func(gzw io.Writer) error) error

Write adds a gzip writer to the given writer, and calls the given function with the gzip writer, returning the error from that function.

Types

This section is empty.

Jump to

Keyboard shortcuts

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