haiku/headers/private/package/hpkg/ZlibDecompressor.h
Oliver Tappe 0d6b3b20e1 More work on package kit:
* added class BPackageInfo, which contains packaging attributes of
  a package (the values relevant for package management) 
* implemented parser (mostly) for reading a BPackageInfo from a config
  file (.PackageInfo) in order to pass them on to the PackageWriter 
  when creating a package
* pulled hpkg-related stuff from bin/package into the package kit
* adjusted packagefs-Volume to skip .PackageInfo files when populating
  the mountpoint, as those files shouldn't appear as part of an
  activated package


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40301 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-27 23:17:03 +00:00

55 lines
993 B
C++

/*
* Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
* Distributed under the terms of the MIT License.
*/
#ifndef ZLIB_DECOMPRESSOR_H
#define ZLIB_DECOMPRESSOR_H
#include <zlib.h>
#include <package/hpkg/ZlibCompressionBase.h>
namespace BPackageKit {
namespace BHaikuPackage {
namespace BPrivate {
class DataOutput;
class ZlibDecompressor : public ZlibCompressionBase {
public:
ZlibDecompressor(DataOutput* output);
~ZlibDecompressor();
status_t Init();
status_t DecompressNext(const void* input,
size_t inputSize);
status_t Finish();
static status_t DecompressSingleBuffer(const void* input,
size_t inputSize, void* output,
size_t outputSize,
size_t& _uncompressedSize);
private:
z_stream fStream;
DataOutput* fOutput;
bool fStreamInitialized;
bool fFinished;
};
} // namespace BPrivate
} // namespace BHaikuPackage
} // namespace BPackageKit
#endif // ZLIB_DECOMPRESSOR_H