70 , std::string
const & comment)
74 m_valid =
static_cast<bool>(is);
77 std::istream::pos_type
const current(is.tellg());
79 is.seekg(current, std::ios::beg);
98 return std::make_shared<StreamEntry>(*this);
128 StreamEntry const *
const se(dynamic_cast<StreamEntry const * const>(&file_entry));
151 uint32_t result(crc32(0L, Z_NULL, 0));
158 Bytef buf[64 * 1024];
159 f_istream.read(reinterpret_cast<char *>(buf),
sizeof(buf));
164 result = crc32(result, buf,
f_istream.gcount());
std::istream & getStream() const
Retrieve a reference to the istream object.
The zipios namespace includes the Zipios library definitions.
Various exceptions used throughout the Zipios library, all based on zipios::Exception.
uint32_t computeCRC32() const
Compute the CRC32 of this file.
A file entry reading from a stream.
virtual bool isEqual(FileEntry const &file_entry) const
Compare two file entries for equality.
Define the zipios::StreamEntry class.
virtual FileEntry::pointer_t clone() const override
Create a copy of the StreamEntry.
virtual ~StreamEntry() override
Clean up a StreamEntry object.
A FileEntry represents an entry in a FileCollection.
Handle a file path and name and its statistics.
Various functions used throughout the library.
StreamEntry(std::istream &is, FilePath const &filename, std::string const &comment=std::string())
Initialize a StreamEntry object.
virtual bool isEqual(FileEntry const &file_entry) const override
Compare two file entries for equality.
std::shared_ptr< FileEntry > pointer_t
std::size_t m_uncompressed_size