LZ4 decoder (assembler)

All 680x0 related coding posts in this section please.

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 667
Joined: Fri Mar 06, 2009 9:43 am
Contact:

LZ4 decoder (assembler)

Postby Anima » Tue Aug 12, 2014 8:46 pm

Hi,

here's a simple and unoptimized LZ4 decoder written in assembler based on the LZ4 streaming format documentation.

LZ4 encoding example:

Code: Select all

lz4 -9 <input_file> <output_file.lz4>


Decoder in assembler (input: a0.l = lz4 compressed data address, a1.l = destination address):

Code: Select all

lz4_decode:
    addq.l  #7,a0
    lea     endian_data+4(pc),a2

    moveq.l #0,d2
data_block_loop:
    move.b  (a0)+,-(a2)
    move.b  (a0)+,-(a2)
    move.b  (a0)+,-(a2)
    move.b  (a0)+,-(a2)
    move.l  (a2)+,d3
    bmi.s   block_copy
    beq.s   end_of_stream

    lea     (a0,d3.l),a4

lz4_block_loop:
    moveq.l #0,d0
    move.b  (a0)+,d0

    move.w  d0,d1
    lsr.w   #4,d1
    beq.s   no_literals

    subq.w  #1,d1
    cmp.w   #15-1,d1
    bne.s   literals_copy_loop

additional_literals_length:
    move.b  (a0)+,d2
    add.w   d2,d1
    not.b   d2
    beq.s   additional_literals_length

literals_copy_loop:
    move.b  (a0)+,(a1)+

    dbf     d1,literals_copy_loop

no_literals:
    cmp.l   a4,a0
    beq.s   data_block_loop

    moveq.l #0,d3
    move.b  (a0)+,-(a2)
    move.b  (a0)+,-(a2)
    move.w  (a2)+,d3
    neg.l   d3
    lea     (a1,d3.l),a3

    and.w   #$f,d0
    addq.w  #4-1,d0
    cmp.w   #15+4-1,d0
    bne.s   copy_match_loop

additional_match_length:
    move.b  (a0)+,d2
    add.w   d2,d0
    not.b   d2
    beq.s   additional_match_length

copy_match_loop:
    move.b  (a3)+,(a1)+

    dbf     d0,copy_match_loop

    bra.s   lz4_block_loop

block_copy:
    and.l   #$7fffffff,d3

block_copy_loop:
    move.b  (a0)+,(a1)+

    subq.l  #1,d3
    bne.s   block_copy_loop

    bra.s   data_block_loop

end_of_stream:
    rts

endian_data:
    ds.l    1


Edit: different assembler syntax.
Edit 2: fixes.

Cheers
Sascha
Last edited by Anima on Wed Aug 13, 2014 10:32 am, edited 2 times in total.

User avatar
Cyprian
10 GOTO 10
10 GOTO 10
Posts: 1685
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: LZ4 decoder (assembler)

Postby Cyprian » Wed Aug 13, 2014 6:56 am

interesting topic, unfortunately it seems that assembler code is not Devpac compatible. There are jumps to non existing labels like 1b 2b 3b 4f 5f 6f and some duplicate labels like 2: 3: 4:
Lynx II / Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Steem SSE / Aranym / Saint
http://260ste.appspot.com/

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 667
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: LZ4 decoder (assembler)

Postby Anima » Wed Aug 13, 2014 8:17 am

Cyprian wrote:interesting topic, unfortunately it seems that assembler code is not Devpac compatible. There are jumps to non existing labels like 1b 2b 3b 4f 5f 6f and some duplicate labels like 2: 3: 4:


Hello Cyprian,

I've changed the syntax in the original post so please try that code. Hope it's now easier to use in different assemblers.

Cheers
Sascha

User avatar
Cyprian
10 GOTO 10
10 GOTO 10
Posts: 1685
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: LZ4 decoder (assembler)

Postby Cyprian » Wed Aug 13, 2014 9:23 am

Thanks Sascha, unfortunately still missing data_block_loop.
I've changed myself hexadecimal notation from "#0x" to "#$"
Lynx II / Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Steem SSE / Aranym / Saint
http://260ste.appspot.com/

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 667
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: LZ4 decoder (assembler)

Postby Anima » Wed Aug 13, 2014 10:33 am

Cyprian wrote:Thanks Sascha, unfortunately still missing data_block_loop.
I've changed myself hexadecimal notation from "#0x" to "#$"


%$§&"%§$&"%§$... But now it should be complete (original post updated). ;)

User avatar
Cyprian
10 GOTO 10
10 GOTO 10
Posts: 1685
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: LZ4 decoder (assembler)

Postby Cyprian » Thu Aug 14, 2014 5:26 pm

now works fine, thanks.
Ray/TSSC some times ago published LZ77 and LZ78 depackers for 68k.
http://s390174849.online.de/ray.tscc.de/code.htm#lz77
After my vacations I'll try to compare all of them on my ST and TT.
Lynx II / Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Steem SSE / Aranym / Saint
http://260ste.appspot.com/

User avatar
Cyprian
10 GOTO 10
10 GOTO 10
Posts: 1685
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: LZ4 decoder (assembler)

Postby Cyprian » Mon Aug 18, 2014 10:12 am

I've just got back from vacation therefore I haven't had no opportunity yet to check that on real hardware. But in meantime I checked compression ration for different packers for PI1 image file 32 034 bytes size:

Code: Select all

      
LZ78    31 804        99.3%
LZ77    30 103        94.0%
LZ4     28 527        89.1%
ARJ4    28 095        87.7%
PFT     26 267        82.0%
ARJ7    25 145        78.5%


Below is command line for those packers:

Code: Select all

lz4 -9 -z TEST.PI1 TEST.LZ4
lz77 p TEST.PI1 TEST.LZ77
lz78 p TEST.PI1 TEST.LZ78
ARJBETA a -m7 TEST.ARJ7  TEST.PI1
ARJBETA a -m4 TEST.ARJ4  TEST.PI1
PACKFIRE -bt TEST.PI1 TEST.PFT


I'll try to measures also depack time on ST/TT
Lynx II / Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Steem SSE / Aranym / Saint
http://260ste.appspot.com/

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 667
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: LZ4 decoder (assembler)

Postby Anima » Mon Aug 18, 2014 10:23 am

Thanks for the compression comparison. :coffe:

Cyprian wrote:I'll try to measures also depack time on ST/TT

I'm very interested in the results.

Cheers
Sascha

User avatar
Nyh
Atari God
Atari God
Posts: 1496
Joined: Tue Oct 12, 2004 2:25 pm
Location: Netherlands

Re: LZ4 decoder (assembler)

Postby Nyh » Mon Aug 18, 2014 10:38 am

Did you test the decoder? As in decompressed file is the dame as the compressed file?

When I read the LZ4 documentation I think it is a little endian based format. The MC68000 of the Atari is an big endian processor. I do not see any of the byte shuffling needed to convert from little to big endian.

Hans Wessels

User avatar
Cyprian
10 GOTO 10
10 GOTO 10
Posts: 1685
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: LZ4 decoder (assembler)

Postby Cyprian » Mon Aug 18, 2014 12:22 pm

Nyh wrote:Did you test the decoder? As in decompressed file is the dame as the compressed file?

yes, I did in Steem/Hatari. For me it works fine and both files are equal,
Attached you can find binary with source code.
You do not have the required permissions to view the files attached to this post.
Lynx II / Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Steem SSE / Aranym / Saint
http://260ste.appspot.com/

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 667
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: LZ4 decoder (assembler)

Postby Anima » Mon Aug 18, 2014 3:30 pm

Nyh wrote:When I read the LZ4 documentation I think it is a little endian based format. The MC68000 of the Atari is an big endian processor. I do not see any of the byte shuffling needed to convert from little to big endian.


Here are the two parts dealing with little endian values (32 Bit block length and 16 Bit match offset):

Code: Select all

    move.b  (a0)+,-(a2)
    move.b  (a0)+,-(a2)
    move.b  (a0)+,-(a2)
    move.b  (a0)+,-(a2)
    move.l  (a2)+,d3

Code: Select all

    move.b  (a0)+,-(a2)
    move.b  (a0)+,-(a2)
    move.w  (a2)+,d3


Cheers
Sascha

User avatar
Zorro 2
Administrator
Administrator
Posts: 2207
Joined: Tue May 21, 2002 12:44 pm
Location: Saint Cloud (France)
Contact:

Re: LZ4 decoder (assembler)

Postby Zorro 2 » Thu Aug 21, 2014 8:22 am

Hi Cyprian, I didn't know this last version of LZ7, thanks to post this recap of decompact programs :cheers:

Nice work mister Anima :D

How I can have all programs and asm code ? Can you post them here ?
Member of NoExtra Team

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2978
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: LZ4 decoder (assembler)

Postby AtariZoll » Thu Aug 21, 2014 9:38 am

Anima wrote:
Nyh wrote:When I read the LZ4 documentation I think it is a little endian based format. The MC68000 of the Atari is an big endian processor. I do not see any of the byte shuffling needed to convert from little to big endian.


Here are the two parts dealing with little endian values (32 Bit block length and 16 Bit match offset):

Code: Select all

    move.b  (a0)+,-(a2)
    move.b  (a0)+,-(a2)
    move.b  (a0)+,-(a2)
    move.b  (a0)+,-(a2)
    move.l  (a2)+,d3

Code: Select all

    move.b  (a0)+,-(a2)
    move.b  (a0)+,-(a2)
    move.w  (a2)+,d3


Cheers
Sascha


Little faster would be simple: move.w (a2)+,d3 , rol.w #8,d3 - for word. In case of long may use swap instruction.
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 667
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: LZ4 decoder (assembler)

Postby Anima » Thu Aug 21, 2014 3:25 pm

AtariZoll wrote:Little faster would be simple: move.w (a2)+,d3 , rol.w #8,d3 - for word. In case of long may use swap instruction.


I guess you want to replace

Code: Select all

    move.b  (a0)+,-(a2)
    move.b  (a0)+,-(a2)
    move.w  (a2)+,d3
with

Code: Select all

    move.w  (a0)+,d3
    rol.w   #8,d3


If so it would also require that a0 points always to word aligned data. Unfortunately that's not the case here.

Cheers
Sascha

User avatar
Cyprian
10 GOTO 10
10 GOTO 10
Posts: 1685
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: LZ4 decoder (assembler)

Postby Cyprian » Fri Aug 22, 2014 9:31 pm

Ok, now we have (almost, because I didn't prepare ARJ7 decoder) a full picture. Below you can find figures from ST.
Image
Lynx II / Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Steem SSE / Aranym / Saint
http://260ste.appspot.com/

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 667
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: LZ4 decoder (assembler)

Postby Anima » Wed Aug 27, 2014 7:00 pm

Hi Cyprian,

thanks for the numbers.

Here's an optimized version of the decoder. You may do some tests with it as well!? ;)

Code: Select all

lz4_decode:
    addq.l    #7,a0
    lea       little_endian+4,a2
    moveq     #0,d2
    move.w    #$f,d4

next_block:
    move.b    (a0)+,-(a2)
    move.b    (a0)+,-(a2)
    move.b    (a0)+,-(a2)
    move.b    (a0)+,-(a2)
    move.l    (a2)+,d3
    bmi       copy_uncompressed_block
    beq       end_of_compressed_data

    lea       (a0,d3.l),a4

next_token:
    moveq     #0,d0
    move.b    (a0)+,d0

    move.w    d0,d1
    lsr.w     #4,d1
    beq.s     match_data_only

    cmp.w     d4,d1
    beq.s     additional_literal_length

    subq.w    #1,d1

short_literal_copy_loop:
    move.b    (a0)+,(a1)+

    dbra      d1,short_literal_copy_loop

    bra.s     process_match_data

additional_literal_length:
    move.b    (a0)+,d2
    add.w     d2,d1
    not.b     d2
    beq.s     additional_literal_length

    move.w    d1,d3
    lsr.w     #4,d1
    and.w     d4,d3
    add.w     d3,d3
    neg.w     d3
    jmp       literal_copy_start(pc,d3.w)

long_literal_copy_loop:
    move.b    (a0)+,(a1)+
    move.b    (a0)+,(a1)+
    move.b    (a0)+,(a1)+
    move.b    (a0)+,(a1)+
    move.b    (a0)+,(a1)+
    move.b    (a0)+,(a1)+
    move.b    (a0)+,(a1)+
    move.b    (a0)+,(a1)+
    move.b    (a0)+,(a1)+
    move.b    (a0)+,(a1)+
    move.b    (a0)+,(a1)+
    move.b    (a0)+,(a1)+
    move.b    (a0)+,(a1)+
    move.b    (a0)+,(a1)+
    move.b    (a0)+,(a1)+
    move.b    (a0)+,(a1)+
literal_copy_start:
    dbra      d1,long_literal_copy_loop

process_match_data:
    cmpa.l    a4,a0
    beq.s     next_block

match_data_only:
    moveq     #0,d3
    move.b    (a0)+,-(a2)
    move.b    (a0)+,-(a2)
    move.w    (a2)+,d3
    neg.l     d3
    lea       (a1,d3.l),a3

    and.w     d4,d0
    cmp.w     d4,d0
    beq.s     additional_match_length

    move.b    (a3)+,(a1)+
    move.b    (a3)+,(a1)+
    move.b    (a3)+,(a1)+
short_match_copy_loop:
    move.b    (a3)+,(a1)+

    dbra      d0,short_match_copy_loop

    bra.s     next_token

additional_match_length:
    move.b    (a0)+,d2
    add.w     d2,d0
    not.b     d2
    beq.s     additional_match_length

    move.w    d0,d3
    lsr.w     #4,d0
    and.w     d4,d3
    add.w     d3,d3
    neg.w     d3
    jmp       match_copy_start(pc,d3.w)

long_match_copy_loop:
    move.b    (a3)+,(a1)+
    move.b    (a3)+,(a1)+
    move.b    (a3)+,(a1)+
    move.b    (a3)+,(a1)+
    move.b    (a3)+,(a1)+
    move.b    (a3)+,(a1)+
    move.b    (a3)+,(a1)+
    move.b    (a3)+,(a1)+
    move.b    (a3)+,(a1)+
    move.b    (a3)+,(a1)+
    move.b    (a3)+,(a1)+
    move.b    (a3)+,(a1)+
    move.b    (a3)+,(a1)+
    move.b    (a3)+,(a1)+
    move.b    (a3)+,(a1)+
    move.b    (a3)+,(a1)+
match_copy_start:
    dbra      d0,long_match_copy_loop

    move.b    (a3)+,(a1)+
    move.b    (a3)+,(a1)+
    move.b    (a3)+,(a1)+
    move.b    (a3)+,(a1)+

    bra       next_token

copy_uncompressed_block:
    andi.l    #$7fffffff,d3
block_copy_loop:
    move.b    (a0)+,(a1)+

    subq.l    #1,d3
    bne.s     block_copy_loop

    bra       next_block
 
end_of_compressed_data:
    rts

little_endian:
   ds.l   1


Profile data suggest that it gives an speed improvement of up to 18% compared to the one in the original post. It also still fits in a MC68030 cache. :D

Cheers
Sascha
Last edited by Anima on Sun Aug 31, 2014 4:08 pm, edited 1 time in total.

User avatar
Cyprian
10 GOTO 10
10 GOTO 10
Posts: 1685
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: LZ4 decoder (assembler)

Postby Cyprian » Sun Aug 31, 2014 2:03 pm

optimized code looks promising but it seems that there is something wrong with it. It's depacking data till the end of available memory. Unfortunately I had no time to investigate that. Besides that one:

Code: Select all

lea       little_endian,a2

to

Code: Select all

lea       little_endian+4,a2


In meantime I found out nice packer/depacker for Amiga - Shrinkler
I did small test for 4628byte file and Shrinkler (SHR and SHR mini) performed well there. Keep in mind that depacker is included into those 4212 and 4296 bytes

Packer | Size | Ratio
PFL | 4022 | 86.9%
SHR mini | 4212 | 91.0%
ARJ7 | 4237 | 91.6%
PFT | 4239 | 91.6%
SHR | 4296 | 92.8%
LZ4 | 4590 | 99.2%
ARJ4 | 4733 | 102.3%
LZ77 | 4978 | 107.6%
LZ78 | 5485 | 118.5%
Lynx II / Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Steem SSE / Aranym / Saint
http://260ste.appspot.com/

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 667
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: LZ4 decoder (assembler)

Postby Anima » Sun Aug 31, 2014 4:08 pm

Cyprian wrote:optimized code looks promising but it seems that there is something wrong with it. It's depacking data till the end of available memory. Unfortunately I had no time to investigate that. Besides that one:

Code: Select all

lea       little_endian,a2

to

Code: Select all

lea       little_endian+4,a2


Uh, thanks. I'll correct the source above. Mind to send me the packed file where the error occurs for testing?

User avatar
Cyprian
10 GOTO 10
10 GOTO 10
Posts: 1685
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: LZ4 decoder (assembler)

Postby Cyprian » Sun Aug 31, 2014 8:52 pm

false alarm, it was an issue with my testing environment.

attached you can find source code
You do not have the required permissions to view the files attached to this post.
Lynx II / Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Steem SSE / Aranym / Saint
http://260ste.appspot.com/

User avatar
Maartau
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2630
Joined: Thu Dec 15, 2005 2:15 am
Location: France

Re: LZ4 decoder (assembler)

Postby Maartau » Wed Oct 08, 2014 5:49 pm

Interesting...

:cheers:

User avatar
leonard
Moderator
Moderator
Posts: 643
Joined: Thu May 23, 2002 10:48 pm
Contact:

Re: LZ4 decoder (assembler)

Postby leonard » Fri Jan 18, 2019 12:23 pm

Hi! I was about to post something here about my fast LZ4 decoder, and by searching "LZ4" I find that thread!

I did three versions of LZ4 depacker. One of them is quite fast. If anyone is interested:

https://github.com/arnaud-carre/lz4-68k

( LZ4 has interesting properties, such as ability to do "in place depacking" using only 64bytes margin! )
Leonard/OXYGENE.

User avatar
ggn
Atari God
Atari God
Posts: 1244
Joined: Sat Dec 28, 2002 4:49 pm

Re: LZ4 decoder (assembler)

Postby ggn » Sat Jan 19, 2019 2:50 pm

Great stuff Anima and Leonard!

Apart from the 4k binary Cyprian tried, has anyone done any other tests regarding pack ratio? I'm still favouring ARJ mode 4 and 7 for max pack ratio, but this looks like a great alternative for when depack speed is crucial.
is 73 Falcon patched atari games enough ? ^^

User avatar
Maartau
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2630
Joined: Thu Dec 15, 2005 2:15 am
Location: France

Re: LZ4 decoder (assembler)

Postby Maartau » Sun Jan 20, 2019 1:23 am

leonard wrote:I did three versions of LZ4 depacker. One of them is quite fast. If anyone is interested:

:cheers: Leonard :thumbs:

User avatar
leonard
Moderator
Moderator
Posts: 643
Joined: Thu May 23, 2002 10:48 pm
Contact:

Re: LZ4 decoder (assembler)

Postby leonard » Sun Feb 10, 2019 5:22 pm

ggn wrote:Apart from the 4k binary Cyprian tried, has anyone done any other tests regarding pack ratio? I'm still favouring ARJ mode 4 and 7 for max pack ratio, but this looks like a great alternative for when depack speed is crucial.


Regarding packing ratio, if you're looking for best ratio ever, use shrinkler. But depacking time is really, really slow. For very good packing ratio and average depacking speed, use ARM mode 7 or UPX ( UPX is almost same packing ratio as ARJ m7 but with depacks 30% faster ). LZ4 has not good packing ratio but is extremly fast compared to other. Look at my atari-st depack benchmark result. First column is the packed size of 3 different binaries for test. Last columns show the number of "50hz" ticks to depack ( lower is faster ).

.l77 is LZ77
.lz is doynamite depacker
.upx UPX
.am7 ARJ beta -m7
.pft PackFire
.lz4 lz4 ( my fast depacker version )
.shk Shrinkler
DepackB_004_SC1425_fastest.png
You do not have the required permissions to view the files attached to this post.
Leonard/OXYGENE.

orionfuzion
Retro freak
Retro freak
Posts: 16
Joined: Fri Nov 11, 2016 1:57 pm
Location: Paris, France
Contact:

Re: LZ4 decoder (assembler)

Postby orionfuzion » Wed Mar 20, 2019 8:43 pm

Hi everybody,

I jump on this thread to ask if someone has the ARJ mode7 unpack routine in ASM?

Thx,

Orion


Social Media

     

Return to “680x0”

Who is online

Users browsing this forum: No registered users and 1 guest