All Projects → disruptek → Frosty

disruptek / Frosty

Licence: mit
serialize native Nim types to strings, streams, or sockets ⛄

Programming Languages

nim
578 projects
types
53 projects

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
Execa
Process execution for humans
Stars: ✭ 4,318 (+17172%)
Mutual labels:  streams, 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
Bits
A bite sized library for dealing with bytes.
Stars: ✭ 16 (-36%)
Mutual labels:  binary
Gocache
☔️ A complete Go cache library that brings you multiple ways of managing your caches
Stars: ✭ 775 (+3000%)
Mutual labels:  memory
Free
Memory usage for macos, an alternative to free command.
Stars: ✭ 18 (-28%)
Mutual labels:  memory
Memorpy
Python library using ctypes to search/edit windows / linux / macOS / SunOS programs memory
Stars: ✭ 721 (+2784%)
Mutual labels:  memory
Walle
iOS Application performance monitoring
Stars: ✭ 19 (-24%)
Mutual labels:  memory
Scodec
Scala combinator library for working with binary data
Stars: ✭ 709 (+2736%)
Mutual labels:  binary
Encore
Synonym of angkor
Stars: ✭ 19 (-24%)
Mutual labels:  memory
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
Mpimemu
MPI Memory Consumption Utilities
Stars: ✭ 17 (-32%)
Mutual labels:  memory

frosty

Test Matrix GitHub release (latest by date) Minimum supported Nim version License buy me a coffee

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.

benchmarks

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's sorta B-Trees.
  • --define:frostyNet=off to omit Socket support for platform reasons.
  • --define:frostyDebug=on to emit some debugging output.

Documentation

The documentation employs Nim's runnableExamples feature to ensure that usage examples are guaranteed to be accurate. The documentation is rebuilt during the CI process and hosted on GitHub.

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].