Categorygithub.com/unixpickle/seektar
modulepackage
0.1.1
Repository: https://github.com/unixpickle/seektar.git
Documentation: pkg.go.dev

# README

seektar GoDoc

Dynamically generated tarballs that support seeking. This can be used from a server to generate downloads for entire directories, while supporting Byte-Range requests.

Example

Here's an example of how to use seektar:

package main

import "github.com/unixpickle/seektar"

func main() {
    tarResult, _ := seektar.Tar("/path/to/directory", "directory")
    tarFile, _ := tarResult.Open()
    defer tarFile.Close()
    // tarFile is an io.Reader, io.Seeker, and io.Closer.
    // It dynamically generates tar data.
}

# Functions

NewFilePiece creates a FilePiece for a file on disk.
NewHTTPFilePiece creates an HTTPFilePiece for a file on an http.FileSystem.
Tar generates a tarball as a Piece.
TarFile generates a tarball containing a single file.
TarHTTP is like Tar, but for an http.FileSystem.
TarHTTPFile generates a tarball containing a single file in an http.FileSystem.

# Constants

No description provided by the author
No description provided by the author

# Structs

A FilePiece is a Piece that is stored in a file.
An HTTPFilePiece is a Piece that is stored in a file in an http.FileSsytem.

# Interfaces

A Piece represents a piece of a tarball.
No description provided by the author

# Type aliases

An Agg is a Piece that combines other Pieces.
A BytePiece is a Piece of pre-defined data.
No description provided by the author