#
44c47711 |
|
12-Jul-2014 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
BPackageWriter: Add BPositionIO support
|
#
8f5130ed |
|
12-Jul-2014 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
package kit: Actually add support for B_HPKG_COMPRESSION_NONE Until now we always declared in the HPKG header that the package file is zlib compressed. For uncompressed files we would just store all individual chunks uncompressed. Now we handle completely uncompressed files slightly differently: We don't write the redundant chunk size table anymore. The size savings are minor, but it makes the uncompressed format read-streamable which may be handy.
|
#
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.
|
#
b3263ad3 |
|
30-Jun-2014 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Switch package kit to BZlibCompressionAlgorithm ... and remove the Zlib{Compressor,Decompressor} API.
|
#
6a89a36a |
|
24-Jun-2014 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Move package kit Zlib* classes to support kit Also move to B* namespace and no longer expose the zlib dependency in the headers.
|
#
84297881 |
|
23-Jun-2014 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Remove BPackageKit::[...]::AbstractDataWriter and friends * FDDataWriter and ZlibDataWriter weren't used anymore. * AbstractDataWriter was implemented only by PackageFileHeapWriter, which was only used by WriterImplBase. * Add a PackageFileHeapWriter::AddDataThrows() which has semantics equivalent to the previously inherited WriteDataThrows().
|
#
32832cbe |
|
23-Jun-2014 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Remove BPackageKit::BDataOutput Use BDataIO instead.
|
#
d2d1af83 |
|
18-Jun-2014 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Revert "Move ZlibDecompressor to libshared" This reverts commit 9af2105d36856be60528c361edf14a263f242338. Conflicts: src/kits/package/Jamfile
|
#
9af2105d |
|
10-Feb-2014 |
Adrien Destugues <pulkomandy@pulkomandy.tk> |
Move ZlibDecompressor to libshared * This will be used to implement compressed http streams * Remove the custom BDataOutput class, and use BDataIO instead, for easier integration with existing code.
|
#
e8533402 |
|
04-Jul-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Repository file format: group attributes of a package * Introduce new package attribute B_HPKG_ATTRIBUTE_ID_PACKAGE (valid only in a repository file) to group the attributes belonging to a package. * BRepositoryContentHandler: - No longer derive from BPackageContentHandler. - Add hooks HandlePackage() and HandlePackageDone() that bracket the attributes for a package. This is more explicit and robust than handlers having to guess when one package ended and the next began. * BRepositoryCache: Make use of BPackageInfoContentHandler. No need to duplicate the code for reading a package info from package info attributes.
|
#
695a1b24 |
|
04-Jul-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
repository writer: fix use of incorrect header size The header size of the package file header was used, which resulted in broken repository files.
|
#
a3e070a7 |
|
24-May-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
WriterImplBase: Add _AddStringAttributeList() ... and simplify some code by using it.
|
#
0f4e11e7 |
|
23-May-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
hpkg format: Add attributes for declaring users and groups
|
#
796343ed |
|
18-May-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Allow specifying the compression level for package creation * Introduce BPackageWriterParameters which comprises all parameters for package creation, currently flags and compression level. Such an object can be passed to BPackageWriter::Init() and is passed on to PackageWriterImpl and WriterImplBase. * PackageFileHeapWriter: Add compressionLevel property and pass the value on to ZlibCompressor. * package add/create: Add options -0 ... -9 to specify the compression level to be used.
|
#
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.
|
#
00bc8e9c |
|
02-Jul-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Add support for adding/updating package entries Add flags parameter to BPackageWriter::Init() (and the private implementation classes) to indicate that an existing package file shall be updated instead of created. Currently that always happens in-place.
|
#
9e93bb4b |
|
26-Jun-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Write resolvable compatible version to the package To avoid a clash with the regular version or an extra attribute level we use the "package:provides.compatible" package attribute instead of "package:version.major".
|
#
327b38d6 |
|
02-Jul-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Add support for adding/updating package entries Add flags parameter to BPackageWriter::Init() (and the private implementation classes) to indicate that an existing package file shall be updated instead of created. Currently that always happens in-place.
|
#
b2709d8a |
|
26-Jun-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Write resolvable compatible version to the package To avoid a clash with the regular version or an extra attribute level we use the "package:provides.compatible" package attribute instead of "package:version.major".
|
#
34d56c1b |
|
14-Feb-2011 |
Oliver Tappe <zooey@hirschkaefer.de> |
* implemented repository reader and fixed some bugs in writer that have been exposed during testing of reader git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40494 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
33bc4425 |
|
12-Feb-2011 |
Oliver Tappe <zooey@hirschkaefer.de> |
Largish adjustments to PackagerReaderImpl and package attribute handling: * package attributes are now compatible with the low level attribute handling of other HPKG attributes (such that 'package dump' now shows package attributes, too) * dropped type names from hpkg format, the attributes were identified by IDs already and this simplifies the code considerably. Type names are now handled in BLowLevelPackageHandler only. * instead of rolling their own mechanism, high-level package attributes handling is now implemented via a corresonding set of AttributeHandler-subclasses * adjusted package writer to only write package attributes that are needed (empty ones are left out) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40466 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
79f15e19 |
|
08-Feb-2011 |
Oliver Tappe <zooey@hirschkaefer.de> |
* minor cleanup: respect 80 chars limit git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40390 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4ee7d007 |
|
08-Feb-2011 |
Oliver Tappe <zooey@hirschkaefer.de> |
Cleanup: * PackageWriterImpl no longer accesses members of WriterImplBase directly, but uses getters/setters instead * package attribute registration has been moved from PackageWriterImpl to WriterImplBase, as it will be used in the same manner by the RepositoryWriter git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40388 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f2022173 |
|
07-Feb-2011 |
Oliver Tappe <zooey@hirschkaefer.de> |
Refactoring step towards implementation of RepositoryWriter: * pulled commonly useful parts out of PackageWriterImpl into WriterImplBase * moved CachedStringTable and related methods into a separate class, StringCache, in order to support having more than one string cache per package file * made package attribute section use a string cache, too, as that's going to be very useful for repositories * instead of writing package attributes directly, we now collect corresponding PackageAttributes and write those later * adjusted package reader accordingly git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40376 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
44c4771163b9166dc042f69cb5373c9de9e37006 |
|
12-Jul-2014 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
BPackageWriter: Add BPositionIO support
|
#
8f5130edfa454cc7ee21e4c3aef2a151f7c3c567 |
|
12-Jul-2014 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
package kit: Actually add support for B_HPKG_COMPRESSION_NONE Until now we always declared in the HPKG header that the package file is zlib compressed. For uncompressed files we would just store all individual chunks uncompressed. Now we handle completely uncompressed files slightly differently: We don't write the redundant chunk size table anymore. The size savings are minor, but it makes the uncompressed format read-streamable which may be handy.
|
#
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.
|
#
b3263ad3e1662cc419849a2d2cf539f9636613dc |
|
30-Jun-2014 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Switch package kit to BZlibCompressionAlgorithm ... and remove the Zlib{Compressor,Decompressor} API.
|
#
6a89a36aa0ce6a53f9758ba767863ac6b4c6156c |
|
24-Jun-2014 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Move package kit Zlib* classes to support kit Also move to B* namespace and no longer expose the zlib dependency in the headers.
|
#
84297881bbcc26aa41292a57130d61ac1247577c |
|
23-Jun-2014 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Remove BPackageKit::[...]::AbstractDataWriter and friends * FDDataWriter and ZlibDataWriter weren't used anymore. * AbstractDataWriter was implemented only by PackageFileHeapWriter, which was only used by WriterImplBase. * Add a PackageFileHeapWriter::AddDataThrows() which has semantics equivalent to the previously inherited WriteDataThrows().
|
#
32832cbe47f991cc6d2b29824903181d8baaaa63 |
|
23-Jun-2014 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Remove BPackageKit::BDataOutput Use BDataIO instead.
|
#
d2d1af830b3f144937ea5e4c3f0e5b74c4c3d737 |
|
18-Jun-2014 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Revert "Move ZlibDecompressor to libshared" This reverts commit 9af2105d36856be60528c361edf14a263f242338. Conflicts: src/kits/package/Jamfile
|
#
9af2105d36856be60528c361edf14a263f242338 |
|
10-Feb-2014 |
Adrien Destugues <pulkomandy@pulkomandy.tk> |
Move ZlibDecompressor to libshared * This will be used to implement compressed http streams * Remove the custom BDataOutput class, and use BDataIO instead, for easier integration with existing code.
|
#
e85334022eac93e41fc48b61784336b25ea2bbc3 |
|
04-Jul-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Repository file format: group attributes of a package * Introduce new package attribute B_HPKG_ATTRIBUTE_ID_PACKAGE (valid only in a repository file) to group the attributes belonging to a package. * BRepositoryContentHandler: - No longer derive from BPackageContentHandler. - Add hooks HandlePackage() and HandlePackageDone() that bracket the attributes for a package. This is more explicit and robust than handlers having to guess when one package ended and the next began. * BRepositoryCache: Make use of BPackageInfoContentHandler. No need to duplicate the code for reading a package info from package info attributes.
|
#
695a1b248a193f9a403d76d3b32666240ee76fcc |
|
04-Jul-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
repository writer: fix use of incorrect header size The header size of the package file header was used, which resulted in broken repository files.
|
#
a3e070a7ff2a735abf31947289f8e73b7c388c8f |
|
24-May-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
WriterImplBase: Add _AddStringAttributeList() ... and simplify some code by using it.
|
#
0f4e11e75c244fd61da150011f1eae5fe79fc2a9 |
|
23-May-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
hpkg format: Add attributes for declaring users and groups
|
#
796343ed73b1707ed97e91e22b72b8ca81bcdbad |
|
18-May-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Allow specifying the compression level for package creation * Introduce BPackageWriterParameters which comprises all parameters for package creation, currently flags and compression level. Such an object can be passed to BPackageWriter::Init() and is passed on to PackageWriterImpl and WriterImplBase. * PackageFileHeapWriter: Add compressionLevel property and pass the value on to ZlibCompressor. * package add/create: Add options -0 ... -9 to specify the compression level to be used.
|
#
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.
|
#
00bc8e9cbd92f6a812d75ad75ca91c34beb67e72 |
|
02-Jul-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Add support for adding/updating package entries Add flags parameter to BPackageWriter::Init() (and the private implementation classes) to indicate that an existing package file shall be updated instead of created. Currently that always happens in-place.
|
#
9e93bb4bfcf0719be2cd809b5354f0a137bfebd0 |
|
26-Jun-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Write resolvable compatible version to the package To avoid a clash with the regular version or an extra attribute level we use the "package:provides.compatible" package attribute instead of "package:version.major".
|
#
327b38d69c8d9a128c64d0535f15b0274b51c51b |
|
02-Jul-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Add support for adding/updating package entries Add flags parameter to BPackageWriter::Init() (and the private implementation classes) to indicate that an existing package file shall be updated instead of created. Currently that always happens in-place.
|
#
b2709d8a0abeca4e08ed63d2f421ffac320e1a29 |
|
26-Jun-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Write resolvable compatible version to the package To avoid a clash with the regular version or an extra attribute level we use the "package:provides.compatible" package attribute instead of "package:version.major".
|
#
34d56c1bf5e8990731ac21d629807f4b8a83f921 |
|
14-Feb-2011 |
Oliver Tappe <zooey@hirschkaefer.de> |
* implemented repository reader and fixed some bugs in writer that have been exposed during testing of reader git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40494 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
33bc4425be0b545ed3d0b7e7a9a873d31e5a0330 |
|
12-Feb-2011 |
Oliver Tappe <zooey@hirschkaefer.de> |
Largish adjustments to PackagerReaderImpl and package attribute handling: * package attributes are now compatible with the low level attribute handling of other HPKG attributes (such that 'package dump' now shows package attributes, too) * dropped type names from hpkg format, the attributes were identified by IDs already and this simplifies the code considerably. Type names are now handled in BLowLevelPackageHandler only. * instead of rolling their own mechanism, high-level package attributes handling is now implemented via a corresonding set of AttributeHandler-subclasses * adjusted package writer to only write package attributes that are needed (empty ones are left out) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40466 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
79f15e19186cbe116e0c71e6da5581f580564d94 |
|
08-Feb-2011 |
Oliver Tappe <zooey@hirschkaefer.de> |
* minor cleanup: respect 80 chars limit git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40390 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4ee7d007d6aa14cd7d9286e52dbb57580fd8f8f7 |
|
08-Feb-2011 |
Oliver Tappe <zooey@hirschkaefer.de> |
Cleanup: * PackageWriterImpl no longer accesses members of WriterImplBase directly, but uses getters/setters instead * package attribute registration has been moved from PackageWriterImpl to WriterImplBase, as it will be used in the same manner by the RepositoryWriter git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40388 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f202217364f40d170b7bf07b60a75457b275b0c1 |
|
07-Feb-2011 |
Oliver Tappe <zooey@hirschkaefer.de> |
Refactoring step towards implementation of RepositoryWriter: * pulled commonly useful parts out of PackageWriterImpl into WriterImplBase * moved CachedStringTable and related methods into a separate class, StringCache, in order to support having more than one string cache per package file * made package attribute section use a string cache, too, as that's going to be very useful for repositories * instead of writing package attributes directly, we now collect corresponding PackageAttributes and write those later * adjusted package reader accordingly git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40376 a95241bf-73f2-0310-859d-f6bbb57e9c96
|