Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > DoxygenspewG.c
Go to the documentation of this file.
00001 00002 /* spew out a thoroughly gigantic file designed so that bzip2 00003 can compress it reasonably rapidly. This is to help test 00004 support for large files (> 2GB) in a reasonable amount of time. 00005 I suggest you use the undocumented --exponential option to 00006 bzip2 when compressing the resulting file; this saves a bit of 00007 time. Note: *don't* bother with --exponential when compressing 00008 Real Files; it'll just waste a lot of CPU time :-) 00009 (but is otherwise harmless). 00010 */ 00011 00012 /* ------------------------------------------------------------------ 00013 This file is part of bzip2/libbzip2, a program and library for 00014 lossless, block-sorting data compression. 00015 00016 bzip2/libbzip2 version 1.0.6 of 6 September 2010 00017 Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> 00018 00019 Please read the WARNING, DISCLAIMER and PATENTS sections in the 00020 README file. 00021 00022 This program is released under the terms of the license contained 00023 in the file LICENSE. 00024 ------------------------------------------------------------------ */ 00025 00026 00027 #define _FILE_OFFSET_BITS 64 00028 00029 #include <stdio.h> 00030 #include <stdlib.h> 00031 00032 /* The number of megabytes of junk to spew out (roughly) */ 00033 #define MEGABYTES 5000 00034 00035 #define N_BUF 1000000 00036 char buf[N_BUF]; 00037 00038 int main ( int argc, char** argv ) 00039 { 00040 int ii, kk, p; 00041 srandom(1); 00042 setbuffer ( stdout, buf, N_BUF ); 00043 for (kk = 0; kk < MEGABYTES * 515; kk+=3) { 00044 p = 25+random()%50; 00045 for (ii = 0; ii < p; ii++) 00046 printf ( "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" ); 00047 for (ii = 0; ii < p-1; ii++) 00048 printf ( "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" ); 00049 for (ii = 0; ii < p+1; ii++) 00050 printf ( "ccccccccccccccccccccccccccccccccccccc" ); 00051 } 00052 fflush(stdout); 00053 return 0; 00054 } Generated on Mon May 28 2012 04:33:21 for ReactOS by
1.7.6.1
|