Home | History | Annotate | Download | only in zip

Lines Matching refs:Writer

18 // Writer implements a zip file writer.
19 type Writer struct {
36 // NewWriter returns a new Writer writing a zip file to w.
37 func NewWriter(w io.Writer) *Writer {
38 return &Writer{cw: &countWriter{w: bufio.NewWriter(w)}}
42 // underlying writer. It should be used when the zip data is appended to an
45 func (w *Writer) SetOffset(n int64) {
52 // Flush flushes any buffered data to the underlying writer.
54 func (w *Writer) Flush() error {
55 return w.cw.w.(*bufio.Writer).Flush()
59 // It does not (and cannot) close the underlying writer.
60 func (w *Writer) Close() error {
68 return errors.New("zip: writer closed twice")
186 return w.cw.w.(*bufio.Writer).Flush()
190 // It returns a Writer to which the file contents should be written.
194 // The file's contents must be written to the io.Writer before the next
196 func (w *Writer) Create(name string) (io.Writer, error) {
206 // It returns a Writer to which the file contents should be written.
208 // The file's contents must be written to the io.Writer before the next
211 func (w *Writer) CreateHeader(fh *FileHeader) (io.Writer, error) {
258 func writeHeader(w io.Writer, h *FileHeader) error {
283 // method ID. If a compressor for a given method is not found, Writer will
285 func (w *Writer) RegisterCompressor(method uint16, comp Compressor) {
292 func (w *Writer) compressor(method uint16) Compressor {
302 zipw io.Writer
368 w io.Writer
379 io.Writer