#go#compression#decompression#deflate#go#golang#gzip#snappy#zip#zstandard#zstd
The "github.com/klauspost/compress" package offers many fast and efficient compression tools in pure Go, including zstandard, S2 (a faster Snappy replacement), optimized deflate for gzip/zip/zlib, and snappy with better compression and concurrency. It also provides entropy encoders (huff0, FSE), HTTP gzip handlers, and a parallel gzip implementation (pgzip). These tools are drop-in replacements for Go's standard libraries but run about twice as fast, saving time and resources. You can easily add it to your project with `go get`. It supports current and recent Go versions and offers options to disable unsafe code or assembly for compatibility. This package benefits you by improving compression speed and efficiency while maintaining compatibility with standard Go compression APIs, making your applications faster and more resource-friendly.
https://github.com/klauspost/compress
# The standard string repr for dicts is hard to read:
»> my_mapping = {'a': 23, 'b': 42, 'c': 0xc0ffee}
»> my_mapping
{'b': 42, 'c': 12648430. 'a': 23} # 😞
# The "#json" module can do a much better job:
»> import json
»> print(json.dumps(my_mapping, indent=4, sort_keys=True))
{
"a": 23,
"b": 42,
"c": 12648430
}
# Note this only works with dicts containing
# primitive types (check out the "pprint" module):
»> json.dumps({all: 'yup'})
TypeError: keys must be a string
История(12м) как в Альфа-Банке сокращали размер JSON файла, который передается на устройство для работы SDUI. Решением стала шаблонизация для отказа от одинаковых блоков UI с разными данными
#оптимизация#json
¿Que puede hacer este bot?
@apimaniaBot
Con éste bot puedes crear PDF a partir de páginas web, convertir texto a imágenes, convertir tablas HTML a json y mucho más
Idioma: español
(Visto en @botsgram_cu)
#pdf#web#texto#imágenes#hrml#json