History log of /haiku/headers/os/package/hpkg/PackageReader.h
Revision Date Author Comments
# e527b796 12-Jul-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Switch package file accessor classes to use BPositionIO

* PackageFileHeap{Reader,Writer} as well as Package{Reader,Writer} and
their implementation and super classes do now internally use a
BPositionIO instead of a FD to access the package file. This provides
more flexibility needed for features to come.
* BPackageReader has already grown a new Init() version with a
BPositionIO* parameter.


# cdfeba5a 08-Jul-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageWriter: Add Recompress()

Allows rewriting an existing package file with a different compression.


# d59e0feb 20-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package: Suppress version mismatch errors where V1 is supported

* Add flags parameter to Init() of BPackageReader and friends.
* Introduce flag B_HPKG_READER_DONT_PRINT_VERSION_MISMATCH_MESSAGE and
don't print a version mismatch error when given.
* package extract/list: Use the new flag.


# 1f633814 17-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

hpkg format: compress the whole heap

Instead of handling compression for individual file/attribute data we
do now compress the whole heap where they are stored. This
significantly improves compression ratios. We still divide the
uncompressed data into 64 KiB chunks and use a chunk offset array for
the compressed chunks to allow for quick random access without too much
overhead. The tradeoff is a limited possible compression ratio -- i.e.
we won't be as good as tar.gz (though surprisingly with my test
archives we did better than zip).

The other package file sections (package attributes and TOC) are no
longer compressed individually. Their uncompressed data are simply
pushed onto the heap where the usual compression strategy applies. To
simplify things the repository format has been changed in the same
manner although it doesn't otherwise use the heap, since it only stores
meta data.

Due to the data compression having been exposed in public and private
API, this change touches a lot of package kit using code, including
packagefs and the boot loader packagefs support. The latter two haven't
been tested yet. Moreover packagefs needs a new kind of cache so we
avoid re-reading the same heap chunk for two different data items it
contains.


# 45d9aa68 10-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

Fix header guard (in comment)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40428 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 95d84e41 30-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

* attributed copyright in all public HPKG headers to Haiku, Inc.
* added my own copyright to a couple of files that I changed


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40321 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5fb1c6ff 30-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

Refactored hpkg implementation to provide some separation between
public and private API (still far from ideal, but a start):
* moved several HPKG-classes into the public namespace BPackageKit::HPKG
* added fImpl-wrappers around PackageReader and PackageWriter to hide
most of the gory details
* adjusted 'package'-binary and packagefs accordingly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40320 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e527b796319f21ca025f68e1964df140daa6de35 12-Jul-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Switch package file accessor classes to use BPositionIO

* PackageFileHeap{Reader,Writer} as well as Package{Reader,Writer} and
their implementation and super classes do now internally use a
BPositionIO instead of a FD to access the package file. This provides
more flexibility needed for features to come.
* BPackageReader has already grown a new Init() version with a
BPositionIO* parameter.


# cdfeba5a1e49d0993e7ab6853c77392bbc10d3c4 08-Jul-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

BPackageWriter: Add Recompress()

Allows rewriting an existing package file with a different compression.


# d59e0feb59b92ca19ecda2935369fd0fcc5a4f56 20-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

package: Suppress version mismatch errors where V1 is supported

* Add flags parameter to Init() of BPackageReader and friends.
* Introduce flag B_HPKG_READER_DONT_PRINT_VERSION_MISMATCH_MESSAGE and
don't print a version mismatch error when given.
* package extract/list: Use the new flag.


# 1f633814fa347b0bd822f683af731615df600347 17-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

hpkg format: compress the whole heap

Instead of handling compression for individual file/attribute data we
do now compress the whole heap where they are stored. This
significantly improves compression ratios. We still divide the
uncompressed data into 64 KiB chunks and use a chunk offset array for
the compressed chunks to allow for quick random access without too much
overhead. The tradeoff is a limited possible compression ratio -- i.e.
we won't be as good as tar.gz (though surprisingly with my test
archives we did better than zip).

The other package file sections (package attributes and TOC) are no
longer compressed individually. Their uncompressed data are simply
pushed onto the heap where the usual compression strategy applies. To
simplify things the repository format has been changed in the same
manner although it doesn't otherwise use the heap, since it only stores
meta data.

Due to the data compression having been exposed in public and private
API, this change touches a lot of package kit using code, including
packagefs and the boot loader packagefs support. The latter two haven't
been tested yet. Moreover packagefs needs a new kind of cache so we
avoid re-reading the same heap chunk for two different data items it
contains.


# 45d9aa68ff2ad8f77891da25d0bd988f5ab3e652 10-Feb-2011 Oliver Tappe <zooey@hirschkaefer.de>

Fix header guard (in comment)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40428 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 95d84e41761622cc71312fa8012a4ceb36836856 30-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

* attributed copyright in all public HPKG headers to Haiku, Inc.
* added my own copyright to a couple of files that I changed


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40321 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5fb1c6ff1f55fe4094a761b653041b3a0b9abf1d 30-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

Refactored hpkg implementation to provide some separation between
public and private API (still far from ideal, but a start):
* moved several HPKG-classes into the public namespace BPackageKit::HPKG
* added fImpl-wrappers around PackageReader and PackageWriter to hide
most of the gory details
* adjusted 'package'-binary and packagefs accordingly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40320 a95241bf-73f2-0310-859d-f6bbb57e9c96