A library for more efficient data transfers by separating the structure from the values and storing each as binary data
Utility to parse a string bytes to bytes and vice-versa
Various operations on Uint8Array data
A tiny (183B to 210B) and fast utility to ascend parent directories
An iteration of the Node.js core streams with a series of improvements
Sniff the encoding from a HTML byte stream
Convert bytes to a human readable string: 1337 → 1.34 kB
URL and cookie safe UIDs
Codecs for strings of different sizes and encodings
A minimal UTF8 implementation for number arrays.
Truncate string to given length in bytes
Detect Filetype by bytes
> Even though this module is publicly accessible, we do not recommend using it in projects outside of [Transloadit](https://transloadit.com). We won't make any guarantees about its workings and can change things at any time, we won't adhere strictly to Se
Detects if a file is binary in Node.js. Similar to Perl's -B.
Byte buffer specialized for data in chunks with special cases for dropping bytes in the front, merging bytes in to various integer types and abandoning buffer without penalty for previous chunk merges.
Modern byte, encoding, converter registry, and PEM utilities for TypeScript projects.
(IEC) Utility to parse a string bytes to bytes and vice-versa
Sizeof of a JavaScript object in Bytes
TypeScript definitions for bytes
No description provided.
Compress JSON in URL friendly strings
protobuf-style varint bytes - use msb to create integer values of varying sizes
Bytes utility functions for ethers.
Generate a unique character string suitible for use in files and URLs.
Allows the specification of bit-based structures and provides an intuitive way of access data. Example: class Flags < StructBase unsigned :direction, 4 unsigned :multiplier, 2 unsigned :offset, 2 end class Entry < StructBase unsigned :offset, 4 nested :flags, Flags unsigned :address, 24 unsigned :cache_id, 16 end In contrast to the already available http://raa.ruby-lang.org/project/bit-struct/ implementation, BitStructEx allows nested structures which are not aligned on byte boundaries.
Packing & unpacking various Ruby data to/from a byte string, incl. arrays, hashes and custom data structures
Data structure and byte array conversion code generate tools.
The ByteInterpreter is a tool to interpret bytes from and encode bytes to binary files. It can either do this piecemeal, or via a set of rigid, ordered instructions that define a data structure.
Apple uses a system of serialization (I think its called dmap…) where a 4-byte string tells of the information following, both its type and what it represents. Its used in the DAAP (Protocol), QuickTime mov structure and doubtless many other places.
A ruby implementation of the canonical serialization for the Libra network. Canonical serialization guarantees byte consistency when serializing an in-memory data structure. It is useful for situations where two parties want to efficiently compare data structures they independently maintain. It happens in consensus where independent validators need to agree on the state they independently compute. A cryptographic hash of the serialized data structure is what ultimately gets compared. In order for this to work, the serialization of the same data structures must be identical when computed by independent validators potentially running different implementations of the same spec in different languages.
A simple Gem to enable any `ActiveRecord::Base` object to store a set of attributes in a set like structure represented through a bitfield on the database level. You only have to specify the name of the set to hold the attributes in question an the rest is done for you through some fine selected Ruby magic. Here is a simple example of how you could use the gem: class Person < ActiveRecord::Base has_set :interests end To get this to work you need some additional work done first: 1. You need an unsigned 8-Byte integer column in your database to store the bitfield. It is expected that the column is named after the name of the set with the suffix `_bitfield` appended (e.g. `interests_bitfield`). You can change that default behavior by providing the option `:column_name` (e.g. `has_set :interests, :column_name => :my_custom_column`). 2. You need a class that provides the valid values to be stored within the set and map the single bits back to something meaningful. The class should be named after the name of the set (you can change this through the `:enum_class` option). This class could be seen as an enumeration and must implement the following simple interface: * There must be a class method `values` to return all valid enumerators in the defined enumeration. * Each enumerator must implement a `name` method to return a literal representation for identification. The literal must be of the type `String`. * Each enumerator must implement a `bitfield_index` method to return the exponent of the number 2 for calculation the position of this enumerator in the bitfield. **Attention** Changing this index afterwards will destroy your data integrity. Here is a simple example of how to implement such a enumeration type while using the the `renum` gem for simplicity. You are free to use anything else that matches the described interface. enum :Interests do attr_reader :bitfield_index Art(0) Golf(1) Sleeping(2) Drinking(3) Dating(4) Shopping(5) def init(bitfield_index) @bitfield_index = bitfield_index end end
No description provided.
No description provided.
No description provided.