Class Poco::Zip::ZipStreamBuf
Author: Applied Informatics Software Engineering GmbH and Contributors

# Poco::Zip

# class ZipStreamBuf

Library: Zip
Package: Zip
Header: Poco/Zip/ZipStream.h

## Description

ZipStreamBuf is used to decompress single files from a Zip file.

## Inheritance

Direct Base Classes: Poco::BufferedStreamBuf

All Base Classes: Poco::BufferedStreamBuf

## Member Summary

Member Functions: close, crcValid, readFromDevice, writeToDevice

## Constructors

### ZipStreamBuf

ZipStreamBuf(
std::istream & istr,
const ZipLocalFileHeader & fileEntry,
bool reposition
);

Creates the ZipStreamBuf. Set reposition to false, if you do on-the-fly decompression.

### ZipStreamBuf

ZipStreamBuf(
std::ostream & ostr,
ZipLocalFileHeader & fileEntry,
bool reposition
);

Creates the ZipStreamBuf. Set reposition to false, if you do on-the-fly compression.

## Destructor

### ~ZipStreamBuf

virtual ~ZipStreamBuf();

Destroys the ZipStreamBuf.

## Member Functions

### close

void close(
Poco::UInt64 & extraDataSize
);

Informs a writing outputstream that writing is done for this stream

### crcValid

bool crcValid() const;

Call this method once all bytes were read from the input stream to determine if the CRC is valid

### readFromDevice

int readFromDevice(
char * buffer,
std::streamsize length
);

### writeToDevice

int writeToDevice(
const char * buffer,
std::streamsize length
);