The Garbage Program hits v0.5
My busy streak of programming continues!
v0.5.0 of GBG, my little utility that creates files filled with pseudo-random bytes of Garbage, is now available.
Previous releases would fill up a 10MiB buffer of random stuff and then repeatedly output that until a file of the required size had been generated. So, for files smaller than 10MiB all the data was random but for larger files the data did eventually repeat. It struck me that having repeated data could be useful, but only if there was some control over the length of the repeated blocks. Conversely having a file of entirely random data may also be handy.
So, I've added a new command line option with which a repeating block size can be specified. For e.g. to create 100 byte random block you would pass the -r:100 option to the program. To get a file that is full of entirely random bytes you can use -r:all.
Now, when generating large files in can be tedious typing in long numbers of bytes and having to calculate (or remember) how many bytes are in, say, 2 Mebibytes. Well now if you want a file that's 100MiB long you can type just that on the command line. This feature works with the -r option too. The strings Kb, MB, GB, KiB, MiB and GiB are all recognised.
I hadn't really tested the 32 bit build of GBG until now. Hmmm - it falls over with out of memory errors for large files. So I've lowered the 20GiB file limit to 1GiB for the 32 bit build. The 64 bit build can still quite happily generate 20GiB files. The limit on the size of repeated blocks specified by the -r option is lower for the 32 bit build too.
So that's what's changed in v0.5.0.
If you want it, here it is, come and get it. 𝅗𝅥𝄰𝅘𝅥𝄮𝅘𝅥𝅮𝅘𝅥𝅘𝅥𝅮
And the source is here.
As an example, running:
gbg data-file 1kib -r:10
generates 1KiB of repeated 20 byte random blocks, followed by a truncated 4 byte block. When I ran that I got this (displayed in Notepad++):
Comments
Post a Comment
Comments are very welcome, but please don't comment here if:
1) You have a query about, or a bug report for, one of my programs or libraries. Most of my posts contain a link to the relevant repository where there will be an issue tracker you can use.
2) You have a query about any 3rd party programs I feature, please address them to the developer(s) - there will be a link in the post.
3) You're one of the tiny, tiny minority who are aggressive or abusive - in the bin you go and reported you will be!
Thanks