File: README.md

package info (click to toggle)
libcompress-bzip2-perl 2.26-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 3,224 kB
  • ctags: 1,460
  • sloc: ansic: 5,825; xml: 2,408; perl: 1,098; sh: 255; makefile: 181; pascal: 122
file content (101 lines) | stat: -rw-r--r-- 2,745 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101

# Compress::Bzip2

### DESCRIPTION

This module provides a Compress::Zlib like Perl interface to the bzip2
library.  It uses the low level interface to the bzip2 algorithm, and
reimplements all high level routines.

### What is Bzip2 ?

bzip2 is a portable lossless data compression library written in ANSI C.
It offers pretty fast compression and fast decompression.
bzip2 has very good results, if you want to compress ASCII Documents.

bzip2 is probably not great for streaming compression.  It fills it's
internal buffer, which depending of parameters is between 100k and 900k
in size, before it outputs ANY compressed data.  It works best compressing
an entire document.

Streaming decompression on the other hand, gives a steady torrent of bytes.

### What is Compress::Bzip2 ?

Compress::Bzip2 provided early bzip2 bindings for Perl5 compatible to
the old Compress::Zlib library. See Compress::Raw::Bzip2 for the new API
compatible with IO::Compress.

It's my intent to make this package like the Compress::Zlib package, so
that code that uses one can fairly easily use the other.  The perlxs stuff
that's visible to perl has methods that have the same names as their
Compress::Zlib counterparts, except that the "g" is changed to a "b".

Most code that uses Compress::Zlib should be able to use this package.
Simply change
```

   $gz = Compress::Zlib::gzopen( "filename", "w" );
   
```

to
```

   $gz = Compress::Bzip2::gzopen( "filename", "w" );
  ```

I made aliases of all the Compress::Zlib functions.  Some of them don't
return anything useful, like crc32 or adler32, cause bzip2 doesn't
do that sort of thing.  Take a look at t/070-gzcomp.t and t/071-gzuncomp.t.

Bug fixes and other feedback are welcome.

### Copyright

bzip2

**Julian Seward**, j s e w a r d   a t   a c m . o r g

Compress-Bzip2 prior to 2.0 is distributed under the terms of the
GNU General Public License (GPL).  See the file COPYING.

Since version 2.0 Compress-Bzip2 is dual-licensed.
You can redistribute it and/or modify it under the same terms as Perl
itself, either Perl version 5.8.3 or, at your option, any later
version of Perl 5 you may have available.


### Many Thanks to:


**Author of bzip2**

Julian Seward, j s e w a r d   a t   a c m . o r g

Cambridge, UK

http://sources.redhat.com/bzip2

**Author of Compress::Zlib**

Paul Marquess, p m q s   a t   c p a n . o r g

http://www.cpan.org

**Author of 1.x Compress::Bzip2 (1999)**

Gawdi Azem <azemgi@rupert.informatik.uni-stuttgart.de>

(last known email, no longer valid)

**Helped out with win32 compatibility**

Sisyphus, s i s y p h u s 1   a t   o p t u s n e t . c o m . a u

**Author of Compress::Bzip2 1.03**

Marco "Kiko" Carnut,
 
k i k o   a t   t e m p e s t . c o m . b r