staticlib_compress  1.2.0
 All Classes Namespaces Files Functions Enumerations
Public Member Functions | List of all members
staticlib::compress::zip_sink< Sink > Class Template Reference

Sink wrapper that creates ZIP archives, CRC sum and compression of entries is NOT supported. More...

#include <staticlib/compress/zip_sink.hpp>

Public Member Functions

 zip_sink (Sink &&sink)
 Constructor.
 ~zip_sink () STATICLIB_NOEXCEPT
 Destructor, will call finalize() if it have not been called yet.
 zip_sink (const zip_sink &)
 Deleted copy constructor.
zip_sink & operator= (const zip_sink &)
 Deleted copy assignment operator.
 zip_sink (zip_sink &&other)
 Move constructor.
zip_sink & operator= (zip_sink &&other)
 Move assignment operator.
std::streamsize write (sl::io::span< const char > span)
 Write implementation.
std::streamsize flush ()
 Calls flush on dest stream.
void add_entry (const std::string &filename)
 Add ZIP entry with the specified name to archive.
void finalize ()
 Finalizes ZIP archive writing Central Directory, may be safely called multiple times, will be called from destructor if not called explicitely.

Detailed Description

template<typename Sink>
class staticlib::compress::zip_sink< Sink >

Sink wrapper that creates ZIP archives, CRC sum and compression of entries is NOT supported.

Constructor & Destructor Documentation

template<typename Sink >
staticlib::compress::zip_sink< Sink >::zip_sink ( Sink &&  sink)
inline

Constructor.

Parameters
sinkdestination to write compressed data into
template<typename Sink >
staticlib::compress::zip_sink< Sink >::~zip_sink ( )
inline

Destructor, will call finalize() if it have not been called yet.

template<typename Sink >
staticlib::compress::zip_sink< Sink >::zip_sink ( const zip_sink< Sink > &  )

Deleted copy constructor.

Parameters
otherinstance
template<typename Sink >
staticlib::compress::zip_sink< Sink >::zip_sink ( zip_sink< Sink > &&  other)
inline

Move constructor.

Parameters
otherother instance

Member Function Documentation

template<typename Sink >
void staticlib::compress::zip_sink< Sink >::add_entry ( const std::string &  filename)
inline

Add ZIP entry with the specified name to archive.

Parameters
filenameZIP entry name
template<typename Sink >
void staticlib::compress::zip_sink< Sink >::finalize ( )
inline

Finalizes ZIP archive writing Central Directory, may be safely called multiple times, will be called from destructor if not called explicitely.

template<typename Sink >
std::streamsize staticlib::compress::zip_sink< Sink >::flush ( )
inline

Calls flush on dest stream.

Returns
value returned by dest stream
template<typename Sink >
zip_sink& staticlib::compress::zip_sink< Sink >::operator= ( const zip_sink< Sink > &  )

Deleted copy assignment operator.

Parameters
otherinstance
Returns
this instance
template<typename Sink >
zip_sink& staticlib::compress::zip_sink< Sink >::operator= ( zip_sink< Sink > &&  other)
inline

Move assignment operator.

Parameters
otherother instance
Returns
this instance
template<typename Sink >
std::streamsize staticlib::compress::zip_sink< Sink >::write ( sl::io::span< const char >  span)
inline

Write implementation.

Parameters
spansource span
Returns
number of bytes processed (read from source buf)

The documentation for this class was generated from the following file: