1/* spew out a thoroughly gigantic file designed so that bzip22can compress it reasonably rapidly. This is to help test3support for large files (> 2GB) in a reasonable amount of time.4I suggest you use the undocumented --exponential option to5bzip2 when compressing the resulting file; this saves a bit of6time. Note: *don't* bother with --exponential when compressing7Real Files; it'll just waste a lot of CPU time :-)8(but is otherwise harmless).9*/1011/* ------------------------------------------------------------------12This file is part of bzip2/libbzip2, a program and library for13lossless, block-sorting data compression.1415bzip2/libbzip2 version 1.0.8 of 13 July 201916Copyright (C) 1996-2019 Julian Seward <[email protected]>1718Please read the WARNING, DISCLAIMER and PATENTS sections in the19README file.2021This program is released under the terms of the license contained22in the file LICENSE.23------------------------------------------------------------------ */242526#define _FILE_OFFSET_BITS 642728#include <stdio.h>29#include <stdlib.h>3031/* The number of megabytes of junk to spew out (roughly) */32#define MEGABYTES 50003334#define N_BUF 100000035char buf[N_BUF];3637int main ( int argc, char** argv )38{39int ii, kk, p;40srandom(1);41setbuffer ( stdout, buf, N_BUF );42for (kk = 0; kk < MEGABYTES * 515; kk+=3) {43p = 25+random()%50;44for (ii = 0; ii < p; ii++)45printf ( "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" );46for (ii = 0; ii < p-1; ii++)47printf ( "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" );48for (ii = 0; ii < p+1; ii++)49printf ( "ccccccccccccccccccccccccccccccccccccc" );50}51fflush(stdout);52return 0;53}545556