Documentation
¶
Index ¶
- func ArchiveSizeFiltered(files []*zip.File, keep Predicate) (int64, bool)
- func RewriteRawHeader(source *zip.FileHeader) *zip.FileHeader
- func StreamFiltered(source ReaderAtCloser, size int64, keep Predicate, optionList ...Option) (io.ReadCloser, int64, error)
- func WriteFiltered(dst io.Writer, files []*zip.File, keep Predicate, bufferSize int) error
- type Option
- type Predicate
- type ReaderAtCloser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArchiveSizeFiltered ¶
ArchiveSizeFiltered returns the exact byte length of the archive generated by WriteFiltered, if it can be represented without zip64 metadata.
func RewriteRawHeader ¶
func RewriteRawHeader(source *zip.FileHeader) *zip.FileHeader
RewriteRawHeader prepares a zip.FileHeader for CreateRaw.
func StreamFiltered ¶
func StreamFiltered( source ReaderAtCloser, size int64, keep Predicate, optionList ...Option, ) (io.ReadCloser, int64, error)
StreamFiltered streams a new zip archive containing only entries for which keep(file) returns true.
The source is owned by this function and will be closed when streaming ends, so the caller should not close it.
Types ¶
type Option ¶
type Option func(*options)
Option is a function that modifies the options for the zipstream.
func WithBufferSize ¶
WithBufferSize returns an Option that sets the buffer size for the zipstream.
Click to show internal directories.
Click to hide internal directories.