aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/compression/bzip2
Commit message (Collapse)AuthorAgeFilesLines
* Remove Algo_RegistryJack Lloyd2016-10-211-2/+1
| | | | | | | I repent my use of global constructors. I repent my use of global locks. Hopefully I will never touch this code again. :)
* Remove Transform base classJack Lloyd2016-04-213-16/+12
| | | | | | | | | | | | | | | | | | | | | | With sufficient squinting, Transform provided an abstract base interface that covered both cipher modes and compression algorithms. However it mapped on neither of them particularly well. In addition this API had the same problem that has made me dislike the Pipe/Filter API: given a Transform&, what does it do when you put bits in? Maybe it encrypts. Maybe it compresses. It's a floor wax and a dessert topping! Currently the Cipher_Mode interface is left mostly unchanged, with the APIs previously on Transform just moved down the type hierarchy. I think there are some definite improvements possible here, wrt handling of in-place encryption, but left for a later commit. The compression API is split into two types, Compression_Algorithm and Decompression_Algorithm. Compression_Algorithm's start() call takes the compression level, allowing varying compressions with a single object. And flushing the compression state is moved to a bool param on `Compression_Algorithm::update`. All the nonsense WRT compression algorithms having zero length nonces, input granularity rules, etc as a result of using the Transform interface goes away.
* cppcheck fixes: Class 'X' has a constructor with 1 argument that is not ↵Daniel Neus2016-03-051-1/+1
| | | | explicit.
* Add final attribute to many classesJack Lloyd2016-01-101-2/+2
| | | | | | | In some cases this can offer better optimization, via devirtualization. And it lets the user know the class is not intended for derivation. Some discussion in GH #402
* Remove all remaining uses of throwing a std:: exception directlyJack Lloyd2015-12-191-6/+6
| | | | See GH #340 and 6b9a3a5 for background
* Reroot the exception hierarchy into a toplevel Exception classJack Lloyd2015-12-111-4/+4
| | | | | | | | As the alternatives are unfortunate for applications trying to catch all library errors, and it seems deriving from std::runtime_error causes problems with MSVC DLLs (GH #340) Effectively reverts 2837e915d82e43
* Add missing overridesJack Lloyd2015-11-111-1/+1
|
* Add missing compression overridesSimon Warta2015-09-011-1/+1
|
* Mark modules pulling in external deps (zlib, boost, etc) as such, andlloyd2015-02-061-1/+1
| | | | | | notify the user when they are enabled. Drop botan-config, replaced by `botan config` command added in 1.11.8
* Remove algo factory, engines, global RNG, global state, etc.lloyd2015-02-041-1/+1
| | | | | | | | | | | | | | | Convert all uses of Algorithm_Factory and the engines to using Algo_Registry The shared pool of entropy sources remains but is moved to EntropySource. With that and few remaining initializations (default OIDs and aliases) moved elsewhere, the global state is empty and init and shutdown are no-ops. Remove almost all of the headers and code for handling the global state, except LibraryInitializer which remains as a compatability stub. Update seeding for blinding so only one hacky almost-global RNG instance needs to be setup instead of across all pubkey uses (it uses either the system RNG or an AutoSeeded_RNG if the system RNG is not available).
* Add a runtime map of string->func() which when called returnlloyd2015-01-281-0/+2
| | | | | | | | | | | | | | | | | Transforms and BlockCiphers. Registration for all types is done at startup but is very cheap as just a std::function and a std::map entry are created, no actual objects are created until needed. This is a huge improvement over Algorithm_Factory which used T::clone() as the function and thus kept a prototype object of each type in memory. Replace existing lookup mechanisms for ciphers, AEADs, and compression to use the transform lookup. The existing Engine framework remains in place for BlockCipher, but the engines now just call to the registry instead of having hardcoded lookups. s/Transformation/Transform/ with typedefs for compatability. Remove lib/selftest code (for runtime selftesting): not the right approach.
* Ensure all files have copyright and license info.lloyd2015-01-102-2/+2
| | | | | Update license header line to specify the terms and refer to the file, neither of which it included before.
* Figure out which decompressor to use based on the input file extension.lloyd2014-12-092-30/+29
| | | | | | | | Rename Bzip to Bzip2, and split Zlib and Deflate compressors into two completely distinct types rather than using a bool flag to the Zlib constructor. Ignore null pointers to our free implementation (LZMA does this).
* Add gzip compression transform and compress command line prog.lloyd2014-11-191-1/+1
|
* Convert compression filters to in-place transforms and refactorlloyd2014-11-183-0/+169
to minimize the amount of logic needed in the files specific to each library.