repo.or.cz
/
ail.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Minor BMP fix
[ail.git]
/
ail
/
bzip2.hpp
blob
bf732fcdb5d161daeaf1bbd61ba5453f24a604e0
1
#pragma once
2
3
#include <bzlib.h>
4
#include <cstdio>
5
#include <string>
6
7
namespace
ail
8
{
9
class
bzip2_reader
10
{
11
public
:
12
bzip2_reader
();
13
bzip2_reader
(
std
::
string
const
&
file_name
);
14
~
bzip2_reader
();
15
16
bool
open
(
std
::
string
const
&
file_name
);
17
bool
read
(
std
::
string
&
buffer
);
18
19
private
:
20
::
bz_stream stream
;
21
::
FILE
*
file
;
22
::
BZFILE
*
bz_file
;
23
};
24
25
bool
decompress_bzip2
(
std
::
string
const
&
file_name
,
std
::
string
&
output
);
26
}