Home | History | Annotate | Download | only in zip

Lines Matching refs:Writer

18 // Writer implements a zip file writer.
19 type Writer struct {
32 // NewWriter returns a new Writer writing a zip file to w.
33 func NewWriter(w io.Writer) *Writer {
34 return &Writer{cw: &countWriter{w: bufio.NewWriter(w)}}
38 // underlying writer. It should be used when the zip data is appended to an
41 func (w *Writer) SetOffset(n int64) {
48 // Flush flushes any buffered data to the underlying writer.
50 func (w *Writer) Flush() error {
51 return w.cw.w.(*bufio.Writer).Flush()
55 // It does not (and cannot) close the underlying writer.
56 func (w *Writer) Close() error {
64 return errors.New("zip: writer closed twice")
177 return w.cw.w.(*bufio.Writer).Flush()
181 // It returns a Writer to which the file contents should be written.
185 // The file's contents must be written to the io.Writer before the next
187 func (w *Writer) Create(name string) (io.Writer, error) {
197 // It returns a Writer to which the file contents should be written.
199 // The file's contents must be written to the io.Writer before the next
202 func (w *Writer) CreateHeader(fh *FileHeader) (io.Writer, error) {
249 func writeHeader(w io.Writer, h *FileHeader) error {
274 // method ID. If a compressor for a given method is not found, Writer will
276 func (w *Writer) RegisterCompressor(method uint16, comp Compressor) {
283 func (w *Writer) compressor(method uint16) Compressor {
293 zipw io.Writer
359 w io.Writer
370 io.Writer