diff options
Diffstat (limited to 'main/src/main/cpp/lzo/util/shortf.pl')
-rw-r--r-- | main/src/main/cpp/lzo/util/shortf.pl | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/main/src/main/cpp/lzo/util/shortf.pl b/main/src/main/cpp/lzo/util/shortf.pl new file mode 100644 index 00000000..500eb450 --- /dev/null +++ b/main/src/main/cpp/lzo/util/shortf.pl @@ -0,0 +1,30 @@ +#! /usr/bin/perl +## vim:set ts=4 sw=4 et: -*- coding: utf-8 -*- +## +##---------------------------------------------------------------------------## +## +## Author: +## Markus F.X.J. Oberhumer <markus@oberhumer.com> +## +## Description: +## Create short files for compression test +## +## Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer +## +##---------------------------------------------------------------------------## + +$c = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; +$c = "\x00\x01\x02"; +$c = "\x00"; + +$x = $c x 1024; + +for $i (0 .. 50) { + $name = sprintf("f%04d.dat",$i); + open(OUTFILE,">$name") || die "$0: cannot open '$name': $!"; + binmode(OUTFILE); + print OUTFILE substr($x,0,$i); + close(OUTFILE); +} + +exit(0); |