aboutsummaryrefslogtreecommitdiff
path: root/src/tests/bzip2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/bzip2.cpp')
-rw-r--r--src/tests/bzip2.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/tests/bzip2.cpp b/src/tests/bzip2.cpp
index 1b6fc2f..26bb9bd 100644
--- a/src/tests/bzip2.cpp
+++ b/src/tests/bzip2.cpp
@@ -10,27 +10,27 @@
10 10
11int main( int argc, char *argv[] ) 11int 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 Bu::File fin( argv[1], Bu::File::Read ); 22 Bu::File fin( argv[1], Bu::File::Read );
23 23
24 Bu::File f( argv[2], Bu::File::WriteNew ); 24 Bu::File f( argv[2], Bu::File::WriteNew );
25 Bu::BZip2 bz2( f ); 25 Bu::BZip2 bz2( f );
26 26
27 for(;;) 27 for(;;)
28 { 28 {
29 nRead = fin.read( buf, 1024 ); 29 nRead = fin.read( buf, 1024 );
30 if( nRead > 0 ) 30 if( nRead > 0 )
31 bz2.write( buf, nRead ); 31 bz2.write( buf, nRead );
32 if( fin.isEos() ) 32 if( fin.isEos() )
33 break; 33 break;
34 } 34 }
35} 35}
36 36