Find a file
Russel Winder 7b67bd437e Switch to library from static library… (#16)
* Switch to library from static library and add back the version and soversion attributes.

* Minor rearrangement to avoid duplication of literals.

* Let the soname be determined from the version number.
2018-12-20 13:05:28 +01:00
doc Generated docs 2015-02-16 13:53:00 +01:00
source remove support for very old DMD, remove unused import 2018-06-10 10:33:56 +02:00
.gitignore add gitignore (#10) 2018-06-10 10:54:19 +02:00
.travis.yml ci, don't use pyenv and install pip3 using apt (#21) 2018-12-14 09:26:25 +01:00
appveyor.yml fix CI failures due to Meson and DMDM nighlies (#17) 2018-09-30 09:45:11 +02:00
dub.json rename dub description (#11) 2018-06-10 10:54:02 +02:00
hmod.cfg hmod.cfg 2015-02-16 13:52:48 +01:00
LICENSE_1_0.txt Initial commit. 2014-08-06 15:35:59 +02:00
meson.build Switch to library from static library… (#16) 2018-12-20 13:05:28 +01:00
README.html README update 2015-02-16 13:53:14 +01:00
README.md convert readme to markdown (#12) 2018-06-10 11:04:28 +02:00

TinyEndian

Introduction

TinyEndian is a minimal endianness library for the D programming language. It has no external dependencies, it only needs a D compiler and Phobos (standard library). TinyEndian doesn't allocate memory and is fully @nogc to allow use in high-performance code.

The API is not stable and may change in the future.

Features

  • Swap byte order of 2- or 4-byte elements in an array in place.
  • Read a UTF-8, UTF-16 or UTF-32 buffer, determine its endianness using a UTF byte-order-mark and convert it to system endianness in place.
  • No external dependencies.
  • pure, nothrow and @nogc.

Directory structure

Directory Contents
./ This README file, license, DUB package file.
./source Source code.

Usage

Assuming you use dub, add this line:

"tinyendian": { "version" : "~>0.2.0" }

to the "dependencies" in your project's dub.json.

If you don't use dub, you can directly copy the source/tinyendian.d file into your project.

TinyEndian requires DMD 2.067 or better.

License

TinyEndian is released under the terms of the Boost Software License 1.0. This license allows you to use the source code in your own projects, open source or proprietary, and to modify it to suit your needs. However, in source distributions, you have to preserve the license headers in the source code and the accompanying license file.

Full text of the license can be found in file LICENSE_1_0.txt and is also displayed here:

Boost Software License - Version 1.0 - August 17th, 2003

Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:

The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,