Well, i know that there is an Upload section. But i first would like to ask, if anyone would find this little tool useful. It's one several tools i have written to test Yalac and other lossless audio codecs.
The documentation is in html, but i don't know how to insert it here. Therefore i perform a plain text copy. May look a bit strange.
Overview
I wrote Damage to test the error recognition and recovery abilities of my new lossless audio compressor YALAC.
Damage generates a copy of user selected files, applies the extension '.err' and then damages the copies. You can define damage (bit-) patterns and the frequency of the damage. A list of the changes of the data is beeing written to a protocol file.
Command line options
Helpscreen
DAMAGE files [-e -f -s -w]
files specify file or directory (Dir\*.ext) to be processed
-e x1 x2... specify up to 5 errors xn of type i or r:
i 3 = (i)nvert a sequence of 3 bits
r 10010 = (r)eplace a bit sequence with bits 10010
(msb left, up to 40 bits)
The default definition is:
i 1 i 2 i 3 i 36 r 000000000000000000000000000000000000
-f r x relative frequency of damage as errors per MByte.
Maximum: 128 Default: 1
-f a x absolute frequency of damage as errors per file.
Up to 1024, but will also be limited to relative maximum.
-s x no damage until file position x in bytes. Default: 4096
-w wait for enter key when finished
files
Specify a single file or use wildcards.
Examples:
d:\VocComp_Data\Sample.wav
Damage file "Sample.wav" in directory "d:\VocComp_Data".
d:\VocComp_Data\*.wav
Damage any file with the extension ".wav" in directory "d:\VocComp_Data".
*.*
Damage any file ".wav" in the current directory.
Damage creates files with the same name as the source, but with the extension '.err':
Sample.wav -> Sample.wav.err
Existing files will always be overwritten without any warning!
-e x1 x2...
Specify up to 5 errors xn of type i or r:
i 3
(I)nvert a sequence of 3 bits. All bits are beeing flipped. Valid range: 1 to 40 bits.
r 10010
®eplace a bit sequence with bits 10010. The leading (left bit) is the most significant. Valid range: 1 to 40 bits.
The default definition is:
i 1
i 2
i 3
i 36
r 000000000000000000000000000000000000
-f
Specify the frequency of the errors. The error patterns (see -e) will be randomly repeated if necessary.
Specify a relative frequency as errors per MByte:
-f r 8
Generates 8 errors per MByte. Maximum: 128.
Or specify the absolute frequency of damage as errors per file:
-f a 25
Generates 25 errors per file. The count will be limited to the relative maximum of 128 per MByte, if the file is small.
In both cases the error count is limited to 1024 errors per file.
The default setting is: -f r 1.
-s x
No damage until file position x in bytes. Default: 4096.
Useful if you don't want to damage a file header.
Protocol file
Damage generates a protocol file "Damage_Result.txt" in the source file directory. It contains a detailed list of any changes performed on the files.
Example:
D:\VocComp\Tools\ATrain.yaa
No Position BitOfs BitNum Original New value
1 142614 00022D16 0 36 B1 DA 8A 49 DD 00 00 00 00 D0
2 444685 0006C90D 0 36 6F 17 E4 F2 14 90 E8 1B 0D 1B
3 771488 000BC5A0 5 1 95 B5
4 1046975 000FF9BF 5 3 9A 7A
5 1264657 00134C11 1 2 78 7E
6 1454473 00163189 5 36 7A F5 C2 36 2A 36 1A 00 00 00 00 36
The file name is beeing followed by a list of the applied errors, one per line.
Position
File position of the first affected byte in bytes. First in decimal, then in hexadecimal representation.
BitOfs
Position (0-7) of the first affected bit in the byte specified by file position.
BitNum
Count of affected bits.
Original - New value
Comparison of the original and the new values after the damage. Both in hexadecimal notation, least significant (lowest adress) byte left.