Documentation ¶
Index ¶
- Variables
- func ApplyHeader(path string, header *tar.Header) error
- func IsSimilarHeader(h *tar.Header, nh *tar.Header) (bool, error)
- func NewGzipReader(r io.Reader) (io.ReadCloser, error)
- func NewGzipWriter(w io.Writer) (io.WriteCloser, error)
- func SetCompressionLevel(compressionLevelStr string) error
- func WriteEntry(w *tar.Writer, src string, h *tar.Header) error
- func WriteHeader(w *tar.Writer, h *tar.Header) error
Constants ¶
This section is empty.
Variables ¶
View Source
var CompressionLevel = pgzip.DefaultCompression
CompressionLevel is the compression level of image layers. Default is pgzip.DefaultCompression.
Functions ¶
func ApplyHeader ¶
ApplyHeader updates file owner, mtime, and permission bits according to header. It doesn't change size or type (i.e file to dir).
func IsSimilarHeader ¶
IsSimilarHeader returns if the given headers are describing similar entries.
func NewGzipReader ¶
func NewGzipReader(r io.Reader) (io.ReadCloser, error)
NewGzipReader returns a new gzip reader.
func NewGzipWriter ¶
func NewGzipWriter(w io.Writer) (io.WriteCloser, error)
NewGzipWriter returns a new gzip writer with compression level.
func SetCompressionLevel ¶
SetCompressionLevel sets global var CompressionLevel.
func WriteEntry ¶
WriteEntry write the file from the local filesystem into the tar writer. This function doesn't handle parent directories.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.