flat assembler
Message board for the users of flat assembler.

Index > Main > LZMA fasm

Goto page 1, 2, 3, 4  Next
Author
Thread Post new topic Reply to topic
narada



Joined: 15 Feb 2008
Posts: 77
Location: Ukraine, Dnepropetrovsk
narada
How about fasm LZMA (e.g. 7-Zip) sources? ))

LZ too. All LZ* sources - let put they here ))

_________________
http://www.omegicus.com
Post 05 Apr 2008, 19:52
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4240
Location: 2018
edfed
what for?
there are still working versions of fasm archives, i don't see why to make it in another way
Post 05 Apr 2008, 20:01
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6038
Location: Poland
MHajduk
If I understood properly, narada proposed to show here sources of packing algorithms (type LZ*) written with FASM (not to pack FASM archives another way).

I think it could be interesting.
Post 05 Apr 2008, 20:25
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4240
Location: 2018
edfed
there, yes, very interresting, it is a code we all need to devellop enormous applications.
a good thing would be to build a macro that will compress the code during compilation, but too hard or impossible to do i presume.
Post 05 Apr 2008, 20:36
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6038
Location: Poland
MHajduk
edfed wrote:
to build a macro that will compress the code during compilation, but too hard or impossible to do i presume.
I think that it is possible (and I'm almost sure, that someone made something like that). Such packing macro should be called after all calls of another FASM macros, when whole byte code will be accessible to pack but before completion of compilation. There are some ciphering macros which work that way.
Post 05 Apr 2008, 20:46
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 2917
Location: [RSP+8*5]
bitRAKE
This macro generates optimal huffman codes:
(not good compression compared to LZ*)

Code:
        @inproceedings{mk95:wads,
                author = "A. Moffat and J. Katajainen",
                title = "In-place calculation of minimum-redundancy codes",
                booktitle = "Proc. Workshop on Algorithms and Data Structures",
                address = "Queen's University, Kingston, Ontario",
                publisher = "LNCS 955, Springer-Verlag",
                Month = aug,
                year = 1995,
                editor = "S.G. Akl and F. Dehne and J.-R. Sack",
                pages = "393-402",
        }    
...was my guide to algorithm.


Description: work not in progress any more
Download
Filename: huffi.asm
Filesize: 6.37 KB
Downloaded: 326 Time(s)


_________________
¯\(°_o)/¯ unlicense.org
Post 05 Apr 2008, 21:00
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6038
Location: Poland
MHajduk
bitRAKE
I haven't tested your macros carefully, but I think that there is a small typographic error: you use 'tre' label, but it isn't defined. I suppose that there should be 'tree' (which is defined).

Hmm... there was one man of genius called Leonardo da Vinci, which intentionally inserted some faulty or incorrect informations in his projects because he wanted to "encrypt" them... Wink but maybe I'm too distrustful in this case... Smile
Post 05 Apr 2008, 21:44
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 2917
Location: [RSP+8*5]
bitRAKE
MHajduk, that's a label from the decompressor. The macro generates correct huffman codes, but does not apply them or build the suffix tree. PRESSME is a macro of code/data to compress. It is most certainly incomplete.

_________________
¯\(°_o)/¯ unlicense.org
Post 05 Apr 2008, 23:11
View user's profile Send private message Visit poster's website Reply with quote
narada



Joined: 15 Feb 2008
Posts: 77
Location: Ukraine, Dnepropetrovsk
narada
but w/o macro, x86 arch needed. for exmpl to make archiver for specified OS (Kol/Menuet or own)
))
Post 05 Apr 2008, 23:15
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
AlexP



Joined: 14 Nov 2007
Posts: 561
Location: Out the window. Yes, that one.
AlexP
Quote:
Hmm... there was one man of genius called Leonardo da Vinci, which intentionally inserted some faulty or incorrect informations in his projects because he wanted to "encrypt" them... but maybe I'm too distrustful in this case...
He made the wheels spin opposite ways in the designs of his tanks, that's funny Smile
Post 05 Apr 2008, 23:46
View user's profile Send private message Visit poster's website Reply with quote
Rahsennor



Joined: 07 Jul 2007
Posts: 61
Rahsennor
Porting LZMA to fasm sounds like a good idea. I'd have a go myself, if I could understand the SDK. Shocked
Post 06 Apr 2008, 06:21
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
> Porting LZMA to fasm sounds like a good idea.

YES Smile FALZMA Very Happy

> I'd have a go myself, if I could understand the SDK.

Hey, Igor intends to release a plain C LZMA SDK (also compress) ASAP - better than C++ Wink

> How about fasm LZMA (e.g. 7-Zip) sources?

Buh Sad I had understood the topic title the other way (port LZMA SDK to FASM) ... but using TAR-LZMA or TAR-7ZIP for FASM is a good idea Very Happy

_________________
Bug Nr.: 12345

Title: Hello World program compiles to 100 KB !!!

Status: Closed: NOT a Bug
Post 07 Apr 2008, 01:07
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
What's the point of re-writing the LZMA SDK in fasm? It would be a maintenance nightmare, if you wanted to keep up with updates (but OK, they're very infrequent these days, so it's at least doable, even if silly).

The sane thing to do would be writing some include files for interfacing with the LZMA SDK libraries, and simply link against those.

But the LZMA SDK is a pretty mangled piece of work, hard to "dive into", and a good example of you shouldn't do C++ code Smile
Post 07 Apr 2008, 11:38
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17352
Location: In your JS exploiting you and your system
revolution
There is no reason to have to keep up with the LZMA-SDK. Once it is written in ASM then why do you need to follow the updates, just go your own way and do whatever.

Plus there is the intangible benefit of learning when writing and debugging it. I can recall my time writing a ZIP compressor/expander. It was, of course, not needed to be done, but there is no substitute for the understanding and knowledge I gained, not just with the algos involved, but also the extra things like performance and interfacing etc.
Post 07 Apr 2008, 12:15
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
revolution wrote:
There is no reason to have to keep up with the LZMA-SDK. Once it is written in ASM then why do you need to follow the updates, just go your own way and do whatever.
Yes, you can do that, but imho it's pretty wasteful "fragmenting" a project like that; better to spend your limited time & resources doing unified development that everybody can benefit from.

Of course the the learning experience can be valuable, but it sounded like the original purpose was reimplenting the algorithms in fasm just for the sake of reimplementing them - which is a waste of time. But I do remember I had that same idea around 8+ years ago, code simply wasn't good enough if it wasn't omfgassembly Wink
Post 07 Apr 2008, 12:24
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 2917
Location: [RSP+8*5]
bitRAKE
If we valued software by global time in use then LZMA might be high on the list of software to optimize? For example, if every hour of computer use equates to 77 seconds of LZMA runtime then we should get a team of 77 people to optimize the hell out of it, lol.

I doubt it's high on the list though.

Hopefully, everyone can see the implications for open source here. It'd be nice it there was a global list of software use. So, people that wanted to optimize software or even algorithms could approach it from a this perspective of global benefit.

_________________
¯\(°_o)/¯ unlicense.org
Post 07 Apr 2008, 16:41
View user's profile Send private message Visit poster's website Reply with quote
narada



Joined: 15 Feb 2008
Posts: 77
Location: Ukraine, Dnepropetrovsk
narada
Hey, sorry for topic name. My english is sooooo... bad (((

Napishu na russkom )). Chto jesli portirovat' ishodniki LZMA na fasm...

_________________
http://www.omegicus.com
Post 07 Apr 2008, 18:29
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6038
Location: Poland
MHajduk
Как я понял, ты уже что-то сделал и хочешь здесь выложить результаты своей работы? Всем форумчанам будет интересно посмотреть исходники LZMA на FASM. Smile
Post 07 Apr 2008, 19:32
View user's profile Send private message Visit poster's website Reply with quote
MichaelH



Joined: 03 May 2005
Posts: 402
MichaelH
Greater than 100 (definitely), less than 1000 (?) ...... that's a guess at the number of posts I read from f0dder telling someone not to do something cause it wasn't worth it Sad

IF IT'S WORTH DOING, IT'S WORTH DOING IT IN ASSEMBLER!
Post 07 Apr 2008, 20:43
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 2917
Location: [RSP+8*5]
bitRAKE
MichaelH wrote:
Greater than 100 (definitely), less than 1000 (?) ...... that's a guess at the number of posts I read from f0dder telling someone not to do something cause it wasn't worth it Sad
I've been reading f0dder's crap for so long I just zone it out. He's a C/C++ guy who likes to troll x86 boards, lol. Nah, he actually has a good perspective on most software stuff, but it isn't a pro-x86 perspective. So, his replies are generally useful and he's a nice guy (after the first cup of coffee I presume). Laughing

(Я буду искать в архивах для x86 LZ* содержимому.)

_________________
¯\(°_o)/¯ unlicense.org
Post 07 Apr 2008, 21:07
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2, 3, 4  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.