Skip to content

Instantly share code, notes, and snippets.

@odzhan
odzhan / winflate.c
Last active March 30, 2024 01:39
Deflate Compression On Windows
/**
BSD 3-Clause License
Copyright (c) 2019 Odzhan. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
@odzhan
odzhan / kitty.c
Created December 7, 2019 08:56
KITTY Compression Algorithm
//
// KITTY compression algorithm, by snowcat
// converted to C, by odzhan
// 2019-12-07
//
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <time.h>
@odzhan
odzhan / jqwerty.c
Created December 7, 2019 09:09
Jacky Qwerty/29A Compression Algorithm
//
// Jacky Qwerty/29A compression algorithm, by Matt Mahoney
// modified by odzhan
// 2019-12-07
//
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <time.h>
@odzhan
odzhan / lzce32.asm
Last active November 18, 2021 18:56
LZCE32 Compression Engine
;
; LZCE32 by Sexy Dufus released in ca. 2000
;
; disassembly by odzhan
; 12-07-2019
;
; Compression ratio is typically ~36% for 1MB EXE
bits 32
@odzhan
odzhan / bnce32.asm
Created December 7, 2019 14:50
Bit Nibble Compression Engine
; BNCE - BlueOwls Nibble Compression Engine
; *****************************************
;
; Introduction
; ************
;
; I made this engine for virusses which want to use some algorithm to make
; themselves or something else smaller (obviously), but i wanted the
; algorithm to be small too, because if it isn't it would have little use
@odzhan
odzhan / bce32.asm
Last active September 20, 2021 19:57
Benny's Compression Engine
; млллллм млллллм млллллм
; кФ Benny's Compression Engine for Win32 ФП ллл ллл ллл ллл ллл ллл
; Г by Г мммллп плллллл ллллллл
; РФФФФФФФФФФФФФ Benny / 29A ФФФФФФФФФФФФФФй лллмммм ммммллл ллл ллл
; ллллллл ллллллп ллл ллл
;
;
;
;Hello everybody,
;
@odzhan
odzhan / rtlcompress.c
Last active June 5, 2021 20:16
Compression using NT Layer DLL API
/**
BSD 3-Clause License
Copyright (c) 2019 Odzhan. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <inttypes.h>
#include <fcntl.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <inttypes.h>
#include <fcntl.h>
#ifdef TEST
/* LZSS encoder-decoder (Haruhiko Okumura; public domain) */
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#define EI 11 /* typically 10..13 */
#define EJ 4 /* typically 4..5 */
#define P 1 /* If match length <= P then output one character */
#define N (1 << EI) /* buffer size */