https://github.com/formulae-org/package-data-js
Data package for Fōrmulæ, in JavaScript
https://github.com/formulae-org/package-data-js
base64 base64string byte-buffer byte-manipulation data-conversion endianness float32 float64 floating-point hexadecimal-string long-int short-int string-decode string-encoding unicode-strings
Last synced: 2 months ago
JSON representation
Data package for Fōrmulæ, in JavaScript
- Host: GitHub
- URL: https://github.com/formulae-org/package-data-js
- Owner: formulae-org
- License: agpl-3.0
- Created: 2024-06-19T05:20:28.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-02-24T04:49:37.000Z (3 months ago)
- Last Synced: 2025-02-24T05:30:46.751Z (3 months ago)
- Topics: base64, base64string, byte-buffer, byte-manipulation, data-conversion, endianness, float32, float64, floating-point, hexadecimal-string, long-int, short-int, string-decode, string-encoding, unicode-strings
- Language: JavaScript
- Homepage:
- Size: 80.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# package-data-js
Data package for the [Fōrmulæ](https://formulae.org) programming language.
Fōrmulæ is also a software framework for visualization, edition and manipulation of complex expressions, from many fields. The code for an specific field —i.e. arithmetics— is encapsulated in a single unit called a Fōrmulæ **package**.
This repository contains the source code for the **data package**. It is intended for the conversion between byte buffers and arbitrary strings, Base64 strings, hexadecimal strings, etc.
The GitHub organization [formulae-org](https://github.com/formulae-org) encompasses the source code for the rest of packages, as well as the [web application](https://github.com/formulae-org/formulae-js).
### Capabilities ###
#### The **Byte buffer** expression
The byte buffer expression is a collecion of raw bytes.
#### Creation ####
* Creation of a byte buffer of a given size (number of bytes) with zero values.
#### Conversions ####
* Conversion from/to a byte buffer to/from an arbitrary string. Unicode strings are supported.
* Conversion from/to a byte buffer to/from a Base64 string.
* Conversion from/to a byte buffer to/from a hexadecimal string.
* Conversion from/to a byte buffer to/from an array of integers.#### Extraccion of data from a byte buffer ####
* Exraction of an integer-8 (a byte) from a given position, and optional signing specification
* Exraction of an integer-16 (usually known in other languages as *short int*) from a given position, and optional signing and endianness
* Exraction of an integer-32 (usually known in other languages as *int*) from a given position, and optional signing and endianness
* Exraction of an integer-64 (usually known in other languages as *long int*) from a given position, and optional signing and endianness
* Exraction of a float-32 (usually known in other languages as *float*) from a given position, and optional endianness
* Exraction of a float-64 (usually known in other languages as *double float*) from a given position, and optional endianness#### Update data in a byte buffer ####
* Update an integer-8 value (a byte) from a given position, and optional signing specification
* Update an integer-16 value (usually known in other languages as *short int*) from a given position, and optional signing and endianness
* Update an integer-32 value (usually known in other languages as *int*) from a given position, and optional signing and endianness
* Update an integer-64 value (usually known in other languages as *long int*) from a given position, and optional signing and endianness
* Update a float-32 value (usually known in other languages as *float*) from a given position, and optional endianness
* Update a float-64 value (usually known in other languages as *double float*) from a given position, and optional endianness#### Expressions for options ####
* Signing
* Unsigned (default)
* Signed
* [Endianness](https://en.wikipedia.org/wiki/Endianness)
* Little-endian (default)
* Big-endian