News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Third Party Libraries

Started by fearless, November 03, 2023, 09:13:39 PM

Previous topic - Next topic

fearless

A collection of third party libraries compiled for x86 and/or x64 assembler. Also includes original created libraries or sourced (pre-compiled) libraries which have include files (included, created or generated) for Masm, Uasm or other assemblers. Some of the attached library zip files (or links to downloads) may also include .api files for RadASM for Masm and/or Uasm.

Note: Some of the libraries will require the Windows 10 Universal C Runtime (CRT): https://www.microsoft.com/en-us/download/details.aspx?id=48234

See also: https://devblogs.microsoft.com/cppblog/introducing-the-universal-crt/



Compression:

Database:

Data Exchange/Serialization:

Image Handling:

Mathematics:

fearless

#1
aPLib: https://ibsensoftware.com/products_aPLib.html

QuoteaPLib is a compression library based on the algorithm used in aPACK (my  executable compressor). aPLib is an easy-to-use alternative to many of the heavy-weight compression libraries available.

The compression ratios achieved by aPLib combined with the speed and tiny footprint of the depackers (as low as 169 bytes!) makes it the ideal choice for many products.

Since the first public release in 1998, aPLib has been one of the top pure LZ-based compression libraries available. It is used in a wide range of products including executable compression and protection software, archivers, games, embedded systems, and handheld devices.



fearless

#2
LZ4: https://github.com/lz4/lz4

QuoteExtremely Fast Compression algorithm.

LZ4 is lossless compression algorithm, providing compression speed > 500 MB/s per core, scalable with multi-cores CPU. It features an extremely fast decoder, with speed in multiple GB/s per core, typically reaching RAM speed limits on multi-core systems.

Speed can be tuned dynamically, selecting an "acceleration" factor which trades compression ratio for faster speed. On the other end, a high compression derivative, LZ4_HC, is also provided, trading CPU time for improved compression ratio. All versions feature the same decompression speed.


fearless

#3
Snappy: https://github.com/google/snappy

QuoteA fast compressor/decompressor

Snappy is a compression/decompression library. It does not aim for maximum compression, or compatibility with any other compression library; instead, it aims for very high speeds and reasonable compression. For instance, compared to the fastest mode of zlib, Snappy is an order of magnitude faster for most inputs, but the resulting compressed files are anywhere from 20% to 100% bigger.

fearless

#4
Zlib: https://zlib.net/ - https://github.com/madler/zlib

QuoteA massively spiffy yet delicately unobtrusive compression library

fearless

#5
Zstandard: https://facebook.github.io/zstd/ - https://github.com/facebook/zstd

QuoteZstandard is a real-time compression algorithm, providing high compression ratios.

Note: attached are rar archives to fit the post limit

jj2007

Quote from: fearless on November 03, 2023, 09:14:36 PMaPLib: https://ibsensoftware.com/products_aPLib.html
Quote from: hutch-- on May 13, 2012, 10:57:54 PMHave a look at Jibz's aPlib library, its written in C but it does work well and you can link it directly into an executable.

Unzip uses the ApLib since 2012 or so. The tinf.lib is 3,662 bytes short. Great stuff from Jørgen Ibsen :thumbsup:

raymond

#7
Quote from: fearless on November 03, 2023, 09:16:57 PMZlib: https://zlib.net/ - https://github.com/madler/zlib

QuoteA massively spiffy yet delicately unobtrusive compression library

I only hope it does not ever get mixed up with the zlib issued many years ago to the masm32 community and related to functions of complex numbers. http://www.ray.masmcode.com/complex.html
Whenever you assume something, you risk being wrong half the time.
http://www.ray.masmcode.com

Biterider

Hi fearless
Thank you for sharing your work. It's truly appreciated.   :thumbsup:

Biterider

Vortex

#9
Jeremy Collake's JCALG1 – Compression Library :

QuoteNOTICE: This is a legacy project originating 20 years ago.

JCALG1 is a lossless compression algorithm loosely based on LZSS. It is written entirely in x86 assembly. It compresses very well, though is slow to compress. Decompression is as rapid as any other LZ77 derivative. It has a unique ability to handle pre-compressed or high entropy data.

Credits: Joergen Ibsen, author of apLib, was instrumental during this algorithm's development. Much of the encoding is similar to that of apLib.

Synopsis: JCALG1 is a small, open-source, LZSS derived compression library.

Features:

Written in 100% 32-bit x86 assembly language for reasons that made sense at the time.
Good compression ratio, typically much better than ZIP's deflate.
Extremely small and fast decompressor.
Adjustable window size to allow for faster compression at the cost of compression ratio.
Decompression requires no additional memory (other than output buffer).
Easy integration with any application.
Free!

https://bitsum.com/portfolio/jcalg1/

Attached is a simple SFX example built with JCALG1 and Hutch's File Data Assembler.

.386
.model flat,stdcall
option casemap:none

extractfile             PROTO :DWORD, :DWORD, :DWORD
JCALG1_Decompress_Fast  PROTO :DWORD, :DWORD
JCALG1_GetUncompressedSizeOfCompressedBlock PROTO :DWORD

EXTERN pData:BYTE

include     \masm32\include\windows.inc
include     \masm32\include\kernel32.inc
include     \masm32\include\user32.inc

includelib  \masm32\lib\kernel32.lib
includelib  \masm32\lib\user32.lib

.data

file    db 'Sample.exe',0
msg     db 'Sample.exe extracted to disc',0
capt    db 'JCALG1 library',0    

.data?

hMem      dd ?
fSize      dd ?
hFile      dd ?
size1      dd ?

.code

start:

    invoke  JCALG1_GetUncompressedSizeOfCompressedBlock,\
            ADDR pData
    mov     fSize,eax
   
    invoke  VirtualAlloc,0,eax,\
            MEM_COMMIT,PAGE_READWRITE
    mov     hMem,eax

    invoke  JCALG1_Decompress_Fast,ADDR pData,eax
   
    xor     eax,eax
    invoke  CreateFile,ADDR file,GENERIC_WRITE,\
            eax,eax,CREATE_ALWAYS,eax,eax
    mov     hFile,eax

    invoke  WriteFile,eax,hMem,fSize,ADDR size1,0
    invoke  CloseHandle,hFile
   
    invoke  VirtualFree,hMem,0,MEM_RELEASE
    invoke  MessageBox,0,ADDR msg,ADDR capt,MB_OK

    invoke  ExitProcess,0

END start

HSE

Hi Vortex!

Quote from: Vortex on November 04, 2023, 05:05:45 AMSFX example built with JCALG

Can extracted file overwrite the "SFX" in Windows?

If I remember well, that worked in DOS, perhaps early Windows versions, not so sure.

HSE
Equations in Assembly: SmplMath

Vortex

Hi HSE,

The extracted file does not touch the main SFX archive, it's not supposed to do this. If you are mentioning about an overlay data connected to a SFX stub, that's possible :

SFX stub for cab archives

HSE

Quote from: Vortex on November 04, 2023, 06:50:27 AMThe extracted file does not touch the main SFX archive, it's not supposed to do this.

Ok.  :thumbsup:


Quote from: Vortex on November 04, 2023, 06:50:27 AMIf you are mentioning about an overlay data connected to a SFX stub, that's possible :
SFX stub for cab archives

Could be something like that, but from commandline. Most probable, SFX was called from a diferent directory. That last work perfectly with example, I see now.

Thanks
Equations in Assembly: SmplMath

fearless

#13
FpuLib: http://www.ray.masmcode.com/fpu.html#fpulib

QuoteThe library consists of the usual arithmetic, trigonometric, hyperbolic, logarithmic and exponential functions. The ASCII-to-float and float-to-ASCII conversion functions are also available in addition to a few other general purpose functions.

Copyright Raymond Filiatreault 2002 - 2010

fearless

#14
MixLib: http://www.ray.masmcode.com/fixmath.html

QuoteA library of functions for fixed point math

March 2005 by Raymond Filiatreault