![]() |
![]() |
#481 |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 48
Posts: 3,839
|
That's pretty short
![]() Can't you make it simpler by packing 8 mode bits into a byte, and then having 8 literals (8 bits) and offsets (16 bits) after that, or does that decrease packing efficiency? |
![]() |
![]() |
#482 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,488
|
Quote:
But you can try my encoder: practically beat LZSS everytime. The problem in pure LZSS was the single literal run (initially the file grow significantly), and too many bit for pair. In my version initially we have little waste for the run of literal (1byte/run vs 1bit/byte, if run>8 we gain); anyhow after the first stages of depacking, incompressible data tend to be less and less... so bad for big files. Same situation for match/lenght (1+15 vs 1+16 bit): if we stay in 'offset' we gain a bit everytime and with longer match! So, well balanced for small data, bytecode access and no bit count/carry replenish. [When you wrote 8 literals (8bits) do you mean 256 literals (8bits) or 8 literals (3bits)?] Your suggestion is just my version with more bits available, so for large files work better. The breakeven could be around 16KB of data. We could try ![]() Last edited by ross; 06 March 2017 at 20:26. Reason: better explanation: run of literal |
|
![]() |
![]() |
#483 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,488
|
First try for Thorham version, got 42byte depacker
![]() I need to think better... |
![]() |
![]() |
#484 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,488
|
38byte, i don't know if I can do better
![]() EDIT: 36! (34 with 15 bit offset) Last edited by ross; 06 March 2017 at 21:53. Reason: got two byte :) |
![]() |
![]() |
#485 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,355
|
Changing the encoding to pack more literals and longer offsets will give results that depend heavily on the kind of data to be compressed and its size. So if it's about changing the format, i would like trying to switch to another algorithm.
Can we have access to the typical data you intend to crunch ? |
![]() |
![]() |
#486 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,488
|
Quote:
If it's for me, I don't have a data target, it's all for fun and mental exercise like everything on Amiga. Since returning I rediscovered why I loved this wonderfull machine. Regarding other types of compressors algorithms I know them well enough, but it is always a pleasure to be able to discuss it with someone! ![]() |
|
![]() |
![]() |
#487 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,355
|
It was directed to you. If you had some typical data to compress, we could have tried to get to the smallest code+data final size, more fun imo.
|
![]() |
![]() |
#488 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,488
|
Quote:
But the real problem here is the encoder part. All this lz+huff(/ari) packers (zip, lzx, lha, lzma..), aside optimal parsing and great encoding, is facing another well defined problem: the split point for the entropy table rebuild. The myriad of ZIP 'deflate' alternative varies in this matter: some euristic vs brute force... (kzip, zopfli, the same 7zip..). You can have the best algorithms but is like the chicken and the egg causality dilemma: which is the best split point for the best entropy result for the best encoding , if encoding modify entropy which in turn modifies the split point? And then, as you said, it all depends on the type of data ![]() Back on the road: exists a decompressor for lzx (in optimized 68k code of course!) or similar powerfull compressor? ![]() |
|
![]() |
![]() |
#489 | |||
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,355
|
Quote:
![]() Quote:
This is why we can't get far without actual data sets to compress. A small bootblock isn't the same as a 30MB wave file. Quote:
I have code for something powerful but it's not general purpose. |
|||
![]() |
![]() |
#490 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,488
|
|
![]() |
![]() |
#491 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,355
|
|
![]() |
![]() |
#492 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,488
|
Quote:
Simply some idea, as I have in so many other fields (only for fun and selflearning). Nothing of lossless, but something about Adaptive DPCM (not IMA related), with quantisation table based on Amiga audio characteristic (mostly on PWM volume and not-DMA driving). Until a few days ago I did not even know what it was the ADPCM... Ciao ![]() |
|
![]() |
![]() |
#493 | ||
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,355
|
Quote:
Quote:
|
||
![]() |
![]() |
#494 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,488
|
|
![]() |
![]() |
#495 | |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 56
Posts: 2,036
|
Quote:
Optimised PackFire depacker was used in one or two WT releases. |
|
![]() |
![]() |
#496 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,488
|
Quote:
PackFire is LZMA based (entropy coder is arithmetic, so the mul). Slow for 68k ![]() Some test on ARJm7: beat original LZX practically everytime and is relatively fast!. I try to better understand how the encoding is. But the 'new' LZX (https://wimlib.net/compression.html#LZX) beat ARJm7 (only tested a small sample of files). We urge unpacker for the new LZX to test speed on 68k ![]() ![]() |
|
![]() |
![]() |
#497 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,355
|
If you really like high compression ratios I suggest you try WinRK.
|
![]() |
![]() |
#498 |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 54
Posts: 4,488
|
|
![]() |
![]() |
#499 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,355
|
Another idea for short code competition...
It's about a routine which takes some value as input (in a register). It must output 4 flags in the 4 lower bits of another register, giving the following information : - value fits in signed word (range FFFF8000-00007FFF) - value fits in unsigned word (range 00000000-0000FFFF) - value fits in signed byte (range FFFFFF80-0000007F) - value fits in unsigned byte (range 00000000-000000FF) Original value must not be altered. Other bits in the flags register are unimportant. 020+ is allowed, total size (including rts and eventual data) has precedence over speed. If you need motivation, goal to beat is 42 bytes. ![]() |
![]() |
![]() |
#500 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,355
|
Next try, did it in 32 bytes
![]() I'm starting to believe it can't be done shorter... |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Starting ASM coding on A1200. Which Assembler? | Nosferax | Coders. Asm / Hardware | 68 | 27 November 2015 16:14 |
4th tutorial on ASM- and HW-coding | Vikke | Coders. Asm / Hardware | 11 | 10 April 2013 20:32 |
3rd tutorial on ASM- and HW-coding | Vikke | Coders. Asm / Hardware | 6 | 26 March 2013 15:57 |
First tutorial on ASM- and HW-coding | Vikke | Coders. Asm / Hardware | 46 | 18 March 2013 12:33 |
2nd tutorial on ASM- and HW-coding | Vikke | Coders. Asm / Hardware | 10 | 17 March 2013 11:49 |
|
|