diff options
Diffstat (limited to '')
-rw-r--r-- | src/tests/lzma.cpp | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/src/tests/lzma.cpp b/src/tests/lzma.cpp index 596c396..7d4d1eb 100644 --- a/src/tests/lzma.cpp +++ b/src/tests/lzma.cpp | |||
@@ -10,44 +10,44 @@ | |||
10 | 10 | ||
11 | int main( int argc, char *argv[] ) | 11 | int main( int argc, char *argv[] ) |
12 | { | 12 | { |
13 | if( argc < 3 ) | 13 | if( argc < 3 ) |
14 | { | 14 | { |
15 | printf("usage: %s <in> <out>\n", argv[0] ); | 15 | printf("usage: %s <in> <out>\n", argv[0] ); |
16 | return -1; | 16 | return -1; |
17 | } | 17 | } |
18 | 18 | ||
19 | char buf[1024]; | 19 | char buf[1024]; |
20 | size_t nRead; | 20 | size_t nRead; |
21 | 21 | ||
22 | /* | 22 | /* |
23 | Bu::File fin( argv[1], Bu::File::Read ); | 23 | Bu::File fin( argv[1], Bu::File::Read ); |
24 | fin.seek( 4 ); | 24 | fin.seek( 4 ); |
25 | Bu::Deflate def( fin ); | 25 | Bu::Deflate def( fin ); |
26 | 26 | ||
27 | Bu::File f( argv[2], Bu::File::WriteNew ); | 27 | Bu::File f( argv[2], Bu::File::WriteNew ); |
28 | 28 | ||
29 | for(;;) | 29 | for(;;) |
30 | { | 30 | { |
31 | nRead = def.read( buf, 1024 ); | 31 | nRead = def.read( buf, 1024 ); |
32 | if( nRead > 0 ) | 32 | if( nRead > 0 ) |
33 | f.write( buf, nRead ); | 33 | f.write( buf, nRead ); |
34 | if( def.isEos() ) | 34 | if( def.isEos() ) |
35 | break; | 35 | break; |
36 | } | 36 | } |
37 | */ | 37 | */ |
38 | 38 | ||
39 | Bu::File fin( argv[1], Bu::File::Read ); | 39 | Bu::File fin( argv[1], Bu::File::Read ); |
40 | 40 | ||
41 | Bu::File f( argv[2], Bu::File::WriteNew ); | 41 | Bu::File f( argv[2], Bu::File::WriteNew ); |
42 | Bu::Lzma def( f, 9 ); | 42 | Bu::Lzma def( f, 9 ); |
43 | 43 | ||
44 | for(;;) | 44 | for(;;) |
45 | { | 45 | { |
46 | nRead = fin.read( buf, 1024 ); | 46 | nRead = fin.read( buf, 1024 ); |
47 | if( nRead > 0 ) | 47 | if( nRead > 0 ) |
48 | def.write( buf, nRead ); | 48 | def.write( buf, nRead ); |
49 | if( fin.isEos() ) | 49 | if( fin.isEos() ) |
50 | break; | 50 | break; |
51 | } | 51 | } |
52 | } | 52 | } |
53 | 53 | ||