CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Thu, 21 Aug 2025 17:43:05 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20090917081402
location: https://web.archive.org/web/20090917081402/https://github.com/antirez/smaz
server-timing: captures_list;dur=1.050871, exclusion.robots;dur=0.032187, exclusion.robots.policy;dur=0.013944, esindex;dur=0.016574, cdx.remote;dur=46.833256, LoadShardBlock;dur=2013.937643, PetaboxLoader3.datanode;dur=63.289572, PetaboxLoader3.resolve;dur=69.682105
x-app-server: wwwb-app210
x-ts: 302
x-tr: 2118
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
set-cookie: wb-p-SERVER=wwwb-app210; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Thu, 21 Aug 2025 17:43:06 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.6.35
x-archive-orig-date: Thu, 17 Sep 2009 08:14:02 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-etag: "e43b47c7401dbd84a2db31bbcf981927"
x-archive-orig-x-runtime: 624ms
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-orig-content-length: 24820
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Thu, 17 Sep 2009 08:14:02 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Thu, 17 Sep 2009 08:14:02 GMT", ; rel="memento"; datetime="Thu, 17 Sep 2009 08:14:02 GMT", ; rel="next memento"; datetime="Wed, 23 Sep 2009 23:15:49 GMT", ; rel="last memento"; datetime="Thu, 27 Mar 2025 17:57:06 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 51_11_20090917031240_crawl101_IndexOnly.gpg-c/51_11_20090917080656_crawl101.arc.gz
server-timing: captures_list;dur=0.457447, exclusion.robots;dur=0.017630, exclusion.robots.policy;dur=0.008229, esindex;dur=0.009568, cdx.remote;dur=18.274238, LoadShardBlock;dur=330.492659, PetaboxLoader3.datanode;dur=266.910989, PetaboxLoader3.resolve;dur=158.069773, load_resource;dur=140.134292
x-app-server: wwwb-app210
x-ts: 200
x-tr: 554
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
antirez's smaz at master - GitHub
This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (

This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (

Description: | Small strings encryption library edit |
Homepage: | edit |
Public Clone URL: |
git://github.com/antirez/smaz.git
Give this clone URL to anyone.
git clone git://github.com/antirez/smaz.git
|
Your Clone URL: |
Use this clone URL yourself.
git clone git@github.com:antirez/smaz.git
|
smaz /
name | age | message | |
---|---|---|---|
![]() |
COPYING | Tue Mar 31 05:23:49 -0700 2009 | README and COPYING added [antirez] |
![]() |
Makefile | Tue Mar 31 05:00:30 -0700 2009 | first commit [antirez] |
![]() |
README | Tue Mar 31 07:22:59 -0700 2009 | doc updated [antirez] |
![]() |
TODO | Tue Mar 31 16:36:41 -0700 2009 | TODO added with feedbacks from progreddit / hac... [antirez] |
![]() |
smaz.c | Tue Mar 31 05:00:30 -0700 2009 | first commit [antirez] |
![]() |
smaz.h | Tue Mar 31 05:00:30 -0700 2009 | first commit [antirez] |
![]() |
smaz_test.c | Tue Mar 31 07:22:59 -0700 2009 | doc updated [antirez] |
README
SMAZ - compression for very small strings ----------------------------------------- Smaz is a simple compression library suitable for compressing very short strings. General purpose compression libraries will build the state needed for compressing data dynamically, in order to be able to compress every kind of data. This is a very good idea, but not for a specific problem: compressing small strings will not work. Smaz instead is not good for compressing general purpose data, but can compress text by 40-50% in the average case (works better with English), and is able to perform a bit of compression for HTML and urls as well. The important point is that Smaz is able to compress even strings of two or three bytes! For example the string "the" is compressed into a single byte. To compare this with other libraries, think that like zlib will usually not be able to compress text shorter than 100 bytes. COMPRESSION EXAMPLES -------------------- 'This is a small string' compressed by 50% 'foobar' compressed by 34% 'the end' compressed by 58% 'not-a-g00d-Exampl333' enlarged by 15% 'Smaz is a simple compression library' compressed by 39% 'Nothing is more difficult, and therefore more precious, than to be able to decide' compressed by 49% 'this is an example of what works very well with smaz' compressed by 49% '1000 numbers 2000 will 10 20 30 compress very little' compressed by 10% In general, lowercase English will work very well. It will suck with a lot of numbers inside the strings. Other languages are compressed pretty well too, the following is Italian, not very similar to English but still compressible by smaz: 'Nel mezzo del cammin di nostra vita, mi ritrovai in una selva oscura' compressed by 33% 'Mi illumino di immenso' compressed by 37% 'L'autore di questa libreria vive in Sicilia' compressed by 28% It can compress URLS pretty well: 'https://google.com' compressed by 59% 'https://programming.reddit.com' compressed by 52% 'https://github.com/antirez/smaz/tree/master' compressed by 46% USAGE ----- The lib consists of just two functions: int smaz_compress(char *in, int inlen, char *out, int outlen); Compress the buffer 'in' of length 'inlen' and put the compressed data into 'out' of max length 'outlen' bytes. If the output buffer is too short to hold the whole compressed string, outlen+1 is returned. Otherwise the length of the compressed string (less then or equal to outlen) is returned. int smaz_decompress(char *in, int inlen, char *out, int outlen); Decompress the buffer 'in' of length 'inlen' and put the decompressed data into 'out' of max length 'outlen' bytes. If the output buffer is too short to hold the whole decompressed string, outlen+1 is returned. Otherwise the length of the compressed string (less then or equal to outlen) is returned. This function will not automatically put a nul-term at the end of the string if the original compressed string didn't included a nulterm. CREDITS ------- Small was writte by Salvatore Sanfilippo and is released under the BSD license. Check the COPYING file for more information.
This feature is coming soon. Sit tight!