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 /* ------------------------------------------------------------------
13 This file is part of bzip2/libbzip2, a program and library for
14 lossless, block-sorting data compression.
16 bzip2/libbzip2 version 1.0.6 of 6 September 2010
17 Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
19 Please read the WARNING, DISCLAIMER and PATENTS sections in the
22 This program is released under the terms of the license contained
24 ------------------------------------------------------------------ */
27 #define _FILE_OFFSET_BITS 64
32 /* The number of megabytes of junk to spew out (roughly) */
33 #define MEGABYTES 5000
38 int main ( int argc
, char** argv
)
42 setbuffer ( stdout
, buf
, N_BUF
);
43 for (kk
= 0; kk
< MEGABYTES
* 515; kk
+=3) {
45 for (ii
= 0; ii
< p
; ii
++)
46 printf ( "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" );
47 for (ii
= 0; ii
< p
-1; ii
++)
48 printf ( "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" );
49 for (ii
= 0; ii
< p
+1; ii
++)
50 printf ( "ccccccccccccccccccccccccccccccccccccc" );