2 /* spew out a thoroughly gigantic file designed so that bzip2
3 can compress it reasonably rapidly. This is to help test
4 support for large files (> 2GB) in a reasonable amount of time.
5 I suggest you use the undocumented --exponential option to
6 bzip2 when compressing the resulting file; this saves a bit of
7 time. Note: *don't* bother with --exponential when compressing
8 Real Files; it'll just waste a lot of CPU time :-)
9 (but is otherwise harmless).
12 #define _FILE_OFFSET_BITS 64
17 /* The number of megabytes of junk to spew out (roughly) */
18 #define MEGABYTES 5000
23 int main ( int argc
, char** argv
)
27 setbuffer ( stdout
, buf
, N_BUF
);
28 for (kk
= 0; kk
< MEGABYTES
* 515; kk
+=3) {
30 for (ii
= 0; ii
< p
; ii
++)
31 printf ( "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" );
32 for (ii
= 0; ii
< p
-1; ii
++)
33 printf ( "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" );
34 for (ii
= 0; ii
< p
+1; ii
++)
35 printf ( "ccccccccccccccccccccccccccccccccccccc" );