CryoGen (Shortened) History
---
[14 Oct 2016]
CyG file ID is now 'CyG_01 '. Should be ready for public release.

[11 Oct 2016]
uses DAZH128 iASM32 hash instead of CRC32

[07 Oct 2016]
LFN support (up to 255 bytes, which changing the format. it is stored
 efficiently)
Note: Found a CRC32 (or CRC32C?) trait. If the current CRC32 = 01020304 and
 the next data calculated is also that value (01020304), the resulting CRC32
 is 00000000. 

[07 Oct 2016]
minor: regrouping some of the variables
read/write 'ECC.CyG' if CygFilename isnt' specified
uses string constants as default file names, even in the prog message
end message is not 'OK' anymore, but 'Done.'

[03 Oct 2016]
rewrite block_error_check -> a bit smaller exe,
 increases the auto-repeat limit to 12, removes commented old codes,
 change default outfile, various minor things, localling variables
 -> minus 1kb exe.
cyg32wo: introduces a cyg32w version (based on cyg32w [27 sep 2016])
 that is compatible with old dos32 cyg. tested with cyg [13 apr 2001]
 on 1 file & it works okay. cyg32wo just ignores the saving/restoring of
 hostfile attribute & time/date, which doesn't work anyway.
 cyg32wo is not compatible to cyg32w (different format).

[02 Oct 2016]
uses 3 ecc types: dsw,dse,ver. hor ecc, being sequential, is generally
 not very effective, thus it's disabled.
assigns 12 as its mode. disables fattr & ftime (but retains the fields)

[01 Oct 2016]
adds retry counter display

[27 Sep 2016]
changes message 'Error on block[,]:' into 'Block[,] is bad:'
switch the loop between x/z & y/z in repair part: should be faster due
 to locality & allows for future bulk xor-ing

[26 Sep 2016]
modifies the repair part a little to be easier to follow
faster checking on average for bad block in a row/column

[24 Sep 2016]
major change:
 rewrites Repair part by absoluting arrays again, simplifying the repairing
 code, & properly differentiating nrow & eccs. finally works after several
 tries. now it supports n:n:m, and thus supports and uses the ideal mode 9:
 64x64x128.

[24 Sep 2016]
buildecc is now unified with getcrc, removing the need for ccrc[]
 helper array. now building crc block & ecc blocks is done in single nested
 loops. Repair part is now using get_new_crc with absolutes, again
 without ccrc[] helper array.

[16 Sep 2016]
getcrc code is now in the main loop. removes fillch() in getcrc
 code (useless). seems faster. otoh, buildecc code is now in separate
 procedure, who absolute the arrays of byte and represents them as matrix,
 which simplifies everything (I should done this a long time ago instead of
 forcing to treat it as single array of byte). exe is smaller & should be
 a bit faster. but no, generic matrixor is not yet possible.
 'R(repair)' message is changed to '(R)epair'

[11 Sep 2016]
fixed: auto-repeat only works for the 1st chunk having errors.
 changed 'Ok' message into 'OK'
 now fully fixed, cyg32 beats iceecc 2.7 & multipar 1.2.5 in my artificially
 error-induced text file using the same size of recovery record. cyg32 can
 fully recover it, while iceecc needs another 80-27 blocks & multipar
 needs 20 more blocks to do so. it also defeats winrar 3.92 with larger
 record (6% rar vs 5% cyg). winrar recovery process is the slowest.

[06 Sep 2016]
there are also known bugs: short filename, and restored time&date on
 fixed file is wacky

[05 Sep 2016]
15 years later... :-)
cryogen 32bit (cyg32-f, 9 mar 2001, dos32 djgpp cwsdpmi) is fixed to be
 compilable on vp21 (win32)
restores block-copy optimizations done on cyg32-g (in which its source
 is lost)

----
Older history
----
##-##-99:       Just the idea
##-11-99:       Mind design
##-12-99:       Failed implementations
                 I even stopped the development, but I restarted with much 
                 simpler algo
13-01-2K:       All done except vertical repair
14-01-2K: 0.00a All completed!
                 Days are spent (sigh)
                  To adjust address
                   How buffer[#] can be (crc/xor)ed with correct (crc/ecc)buf
                  To find the working formulas in loop (I use pencil+paper!)
                  To complete REPAIR part (much harder than BUILD part)
                 But it's finished anyway (phew)
                           Size: 11,792b
15-01-2K:       Optimized, size: 10,672b (-1120b)
                 It also faster
16-01-2K:       Optimized, size:  9,696b (-1066b)
17-01-2K:       Optimized, size:  9,376b (- 320b)
                 Reliability up
18-01-2K:       Public release to Elf.Stuba.Sk
27-01-2K: 0.10a Portability up
                Ratio 1:9 (Matrix XOR 37*37*37)
28-01-2K:       FatalBug: it says corrected but still has error!
          0.00A Ported Cryogen to TMTPascal30 (it's called CryoGen32)
                Ratio 1:19 (!) for at least 500Kb file
                But CryoGen32
                 is slower (half speed) than CryoGen
                 needs i386+ & about 500Kb (in order to get ratio 1:19)
                 possibly has more bugs (was ok in TP, but not in TMTP)
                BugFix: CryoGen32 doesn't write whole recovered file
                Fix: This file heading was "CryoGen Documentation" :)
                Modify report format
29-01-2K: 0.01a Modify report format. Size=9360b
22-02-2K: 0.01A Add auto-repeat. You don't have to re-run CryoGen32 again
                 to get more possible fix. But you may caught in endless
                 loop (mostly on compressed/random data) if CRC16 value 
                 of original & wrong data is equal, making CryoGen32 fix the 
                 same error over & over again. My mistake?
                Add internal error counter. CryoGen32 now doesn't check 
                 CRC32 of recovered file to determine if it still has error 
                 or not (faster)
31-03-2K:       Fix: Replace a executable protection to avoid false-alarm?
                Public release to Elf.Stuba.Sk  
                Todo: add auto-repeat time-out
                      add readkey anytime
18-04-2K:       Try to "port" V0.01A to FPC V0.99.14a. Failed on CRC32 calc.
09-05-2K: 0.02A Finally able to fix CRC calculation
                Hint: Mark Adler/ADLER/Allen Cheng/Adler32 1.0 for Pascal/
                       Marco Schmidt/Checksum.Pas/UpdateCRC32 procedure
                2x faster than V0.01A (as fast as V0.01a)
11-05-2K:       Improve OpenReadFile & OpenWriteFile
15-05-2K:       Public release to Elf.Stuba.Sk
                 Failed: internet is too slow (no time to upload)
                ToDo: higher ratio (no more memory limitation)
                       But ratio 1:25 seems to reduce fixability and remove
                        the possibility of real mode implementation 
                        (1Mb mem)
                      optimized matrixor (same ratio, less memory)
16-05-2K:       Open(read/write)file shows user choice
21-05-2K:       Public release to Elf.Stuba.Sk
19-06-2K: 0.03A Format change:
                 HECC + VECC -> HECC_Size + HECC + VECC_Size + VECC
                 Why: CyG file for files with size <> total-matrixor has
                  some Run-Length-Zeroes (at the end of HECC/VECC blocks)
                  that actually not neccessary (can simply be generated)
                  Then CryoGen can removes RLZs from blocks but still able to
                  read the variably block sizes
                  But the size reduction isn't significant
                  I also coded the changes inefficiently. To be improved...
20-06-2K:       Format change:
                 CRC16 + HECC + VECC ->
                  CRC16_Size + CRC16 + HECC_Size + HECC + VECC_Size + VECC
                 This change allows further size reduction
26-06-2K: 0.04A Halt CryoGen if a key is pressed during Repair & wait for
                 another key to continue (so you can read the report)
                 But you can use Pause key :)
                To handle 'rare' bug (endless loop) on auto-repeat, time-out
                 is added (10 tries), until I can find the real fix :)
27-06-2K:       Bugfix: although CryoGen should be able to open readfile 
                 through path (C:\DATA\MyDat.Txt), it can only open file on
                 current dir (MyDat.Txt)
                ToDo: size reduction makes CryoGen can't no longer determine
                 the correct smallest HostFile needed to build CyG file
02-07-2K:       Public release to Elf.Stuba.Sk, EXEList & Morgan
31-07-2K: 0.05A Bugfix: Damn! V0.03A1 & V0.04A repeatedly claim that undamaged 
                 hostfiles are entirely damaged, while I'm sure that I have 
                 tested them successfully. I spend hours to find & fix
                 the problem, but the worse thing is that I released the 
                 V0.04A. Arggh! Fortunately, nobody uses it (because nobody
                 email me about this problem :)
                 DON'T USE V0.04A!
                Remove addition of '.' on HostFileName
                Bugfix?: I can't find out why the calculation of buffersize
                 is sometimes wrong (tested against 100,000b no-pattern file)
                 and force me to set too large value to zero
01-08-2K:       If CyG file >= HostFile, erase Cyg file
06-08-2K:       Improves RLZ detection (no more wrong buffersize calculation)
                Released to EXEList
13-08-2K:       No more WDOS/X stub. Get CWSDPMI :)
15-11-2k: 0.06A Bugfix: STILL wrong buffersize calculation on no-pattern file
                 Only appear occasionally, so I don't think the bug comes from
                 my detection routine, but from compiler error?
10 Jan 2001
 no more:
  version numbering (only by date)
  update for turbo pascal version (already done a long time ago :)
 change message when cygfilesize >= hostfilesize
 the same bug from v0.06A haven't gone for file under 70,000b (sigh)
  what should i do to kick this fucking bug for good?

04 Mar 2001
 get back to V0.03A [19 Jun 2000] (remove attempt to reduce CRC16 blocks size)
  but add all other bugfixes & enhancements from 20 Jun 2000 to 10 Jan 2001
  this means that the CyG File is using older format
 turbo pascal version will be removed on release-package
  if i release its tp src for small registration fee, would u pay it?

09 Mar 2001
 CRC16 blocks size-reduction is put back again :-) & slightly fixed ?
  tested against (100/70/40/10/etc)thousand bytes of blank file, it works ok!
  if then the bug is come back, i can blame the compiler w/o doubt :)

12 Apr 2001
 optimize in blocks's crc16 creation: faster, simpler & smaller
 info:
  i want to upgrade to fpc v1.0+ but executable is 7kb larger
  allen cheng/adler32/v1.0 is slower! than sean palmer/swag/crc32 under fpc
 
13 Apr 2001
 optimize: uses move() instead for-loop wherever possible, REPAIR part is
  simpler & should be faster
