aboutsummaryrefslogtreecommitdiff
path: root/src/tests/deflate.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-11-05 22:41:51 +0000
committerMike Buland <eichlan@xagasoft.com>2012-11-05 22:41:51 +0000
commitec05778d5718a7912e506764d443a78d6a6179e3 (patch)
tree78a9a01532180030c095acefc45763f07c14edb8 /src/tests/deflate.cpp
parentb20414ac1fe80a71a90601f4cd1767fa7014a9ba (diff)
downloadlibbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.gz
libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.bz2
libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.xz
libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.zip
Converted tabs to spaces with tabconv.
Diffstat (limited to 'src/tests/deflate.cpp')
-rw-r--r--src/tests/deflate.cpp78
1 files changed, 39 insertions, 39 deletions
diff --git a/src/tests/deflate.cpp b/src/tests/deflate.cpp
index 8290ed5..89640e1 100644
--- a/src/tests/deflate.cpp
+++ b/src/tests/deflate.cpp
@@ -10,44 +10,44 @@
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 /* 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::Deflate def( f, 9, Bu::Deflate::Gzip ); 42 Bu::Deflate def( f, 9, Bu::Deflate::Gzip );
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