All Projects → quasilyte → minformat

quasilyte / minformat

Licence: MIT License
gominfmt makes the Go code more compact to aid further compression; revert with gofmt

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to minformat

hasmin
Hasmin - A Haskell CSS Minifier
Stars: ✭ 55 (+189.47%)
Mutual labels:  compression, minifier
Minify
CSS & JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.
Stars: ✭ 1,710 (+8900%)
Mutual labels:  compression, minifier
SevenZipSharp
Fork of SevenZipSharp on CodePlex
Stars: ✭ 171 (+800%)
Mutual labels:  compression
hdt-cpp
HDT C++ Library and Tools
Stars: ✭ 94 (+394.74%)
Mutual labels:  compression
pakkero
Pakkero is a binary packer written in Go made for fun and educational purpose. Its main goal is to take in input a program file (elf binary, script, even appimage) and compress it, protect it from tampering and intrusion.
Stars: ✭ 143 (+652.63%)
Mutual labels:  compression
rc-zip
Pure rust zip & zip64 reading and writing
Stars: ✭ 93 (+389.47%)
Mutual labels:  compression
lz4-napi
Fastest lz4 compression library in Node.js, powered by napi-rs and lz4-flex.
Stars: ✭ 29 (+52.63%)
Mutual labels:  compression
lepcc
Point Cloud Compression used in i3s Scene Layer Format
Stars: ✭ 22 (+15.79%)
Mutual labels:  compression
VTEnc
VTEnc C library
Stars: ✭ 31 (+63.16%)
Mutual labels:  compression
zopflipy
A Python bindings for Zopfli
Stars: ✭ 17 (-10.53%)
Mutual labels:  compression
imagemin-power-cli
Optimize (compress) images with power using imagemin 💪
Stars: ✭ 13 (-31.58%)
Mutual labels:  minifier
pyrus-cramjam
Thin Python wrapper to de/compression algorithms in Rust - lightweight & no dependencies
Stars: ✭ 40 (+110.53%)
Mutual labels:  compression
node-janus
https://wiki.mozilla.org/Mobile/Janus
Stars: ✭ 58 (+205.26%)
Mutual labels:  compression
rangecoder
a fast range coder in C++, using SSE
Stars: ✭ 50 (+163.16%)
Mutual labels:  compression
packtag
A JSP Taglib for delivering minified, combined and gzip-compressed resources (JavaScript and CSS).
Stars: ✭ 22 (+15.79%)
Mutual labels:  compression
bzip2-rs
Pure Rust bzip2 decoder
Stars: ✭ 28 (+47.37%)
Mutual labels:  compression
BrotliSharpLib
Full C# port of Brotli compression algorithm
Stars: ✭ 77 (+305.26%)
Mutual labels:  compression
TinyJPG
images jpg or jpeg compressed and watcher fsnotify
Stars: ✭ 73 (+284.21%)
Mutual labels:  compression
phaser-typescript-webpack
Another Phaser CE boilerplate using TypeScript and Webpack.
Stars: ✭ 17 (-10.53%)
Mutual labels:  uglify
libcaesium
The Caesium compression library written in Rust
Stars: ✭ 58 (+205.26%)
Mutual labels:  compression

Go Report Card GoDoc

go/minformat

This package formats the Go source code in a way so it becomes more compact. It can be considered to be a minifier, although it doesn't make irreversible transformations by default (well, it does remove all comments).

The result can become readable again after running go/format, making this pipeline possible:

  1. Minify the code before transferring it over a network
  2. Send the (potentially further compressed) minified source code
  3. On the receiving side, run gofmt to get the canonical formatting

For (3) I would recommend using gofumpt.

Example

Suppose that we have this hello.go file:

package main

import (
	"fmt"
)

func main() {
	fmt.Println("Hello, playground")
}

It will be formatted into this:

package main;import("fmt");func main(){fmt.Println("Hello, playground")}

Depending on the file, it usually cuts 10-50% of the file size.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].