disruptek / Frosty
Licence: mit
serialize native Nim types to strings, streams, or sockets ⛄
Stars: ✭ 25
Projects that are alternatives of or similar to Frosty
Goridge
High-performance PHP-to-Golang IPC bridge
Stars: ✭ 950 (+3700%)
Mutual labels: binary, sockets
GenericProtocol
⚡️ A fast TCP event based buffered server/client protocol for transferring data over the (inter)net in .NET 🌐
Stars: ✭ 38 (+52%)
Mutual labels: sockets, binary
Lambda Packages
Various popular python libraries, pre-compiled to be compatible with AWS Lambda
Stars: ✭ 713 (+2752%)
Mutual labels: binary
Mern Course Bootcamp
Complete Free Coding Bootcamp with the MERN Stack
Stars: ✭ 730 (+2820%)
Mutual labels: sockets
Chr
🔤 Lightweight R package for manipulating [string] characters
Stars: ✭ 18 (-28%)
Mutual labels: strings
Sseredis
Redis Streams and PubSub to Server-Sent Event bridge in Go
Stars: ✭ 23 (-8%)
Mutual labels: streams
Bedrockframework
High performance, low level networking APIs for building custom servers and clients.
Stars: ✭ 697 (+2688%)
Mutual labels: sockets
Deep Embedded Memory Networks
https://arxiv.org/abs/1707.00836
Stars: ✭ 19 (-24%)
Mutual labels: memory
Sql Streams
Painless low level jdbc abstraction using the java 8 stream api.
Stars: ✭ 17 (-32%)
Mutual labels: streams
Gocache
☔️ A complete Go cache library that brings you multiple ways of managing your caches
Stars: ✭ 775 (+3000%)
Mutual labels: memory
Memorpy
Python library using ctypes to search/edit windows / linux / macOS / SunOS programs memory
Stars: ✭ 721 (+2784%)
Mutual labels: memory
Scodec
Scala combinator library for working with binary data
Stars: ✭ 709 (+2736%)
Mutual labels: binary
Binary.dart
Utilities for working with binary data and bit manipulation in Dart.
Stars: ✭ 16 (-36%)
Mutual labels: binary
Xstrings
Implements string functions widely used in other languages but absent in Go.
Stars: ✭ 888 (+3452%)
Mutual labels: strings
frosty
Serialize native Nim types to strings, streams, or sockets.
Usage
There are two operations: freeze
and thaw
.
freeze[T](input: T; output: Socket or Stream or var string)
import frosty
var
data = someArbitraryDataFactory()
handle = openFileStream("somefile", fmWrite)
# write serialized data into the file handle
freeze(data, handle)
close handle
thaw[T](input: Socket or Stream or string; output: var T)
import frosty
var
data: SomeArbitraryType
handle = openFileStream("somefile", fmRead)
# read deserialized data from the file handle
thaw(handle, data)
close handle
freeze[T](input: T): string
thaw[T](input: Socket or Stream or string): T
import frosty
# adhoc serialization and deserialization
var brrr = freeze("my data")
assert thaw[string](brrr) == "my data"
Performance
Frosty can handle cyclic data structures, but not memory graphs of extreme size -- you can exhaust the stack because our traversal is implemented via recursion. This will be solved soon.
Benchmark vs. Flatty
The source to the following benchmark is found in the tests directory.
The benchmark compares frosty to https://github.com/treeform/flatty for a few static datatypes -- flatty does not work with cast objects yet.
Installation
$ nimph clone disruptek/frosty
or if you're still using Nimble like it's 2012,
$ nimble install https://github.com/disruptek/frosty
Options
-
--define:frostySorted=on
to use Miran'ssorta
B-Trees. -
--define:frostyNet=off
to omitSocket
support for platform reasons. -
--define:frostyDebug=on
to emit some debugging output.
Documentation
License
MIT
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].