Skip to content

ruby0x1/hxtypedarray

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hxtypedarrays


This is an near-full es6 compatible implementation of the TypedArrays specification for binary data views. Differences listed below.

aims:

  • low level (use target specific optimization)
  • lightweight (use abstracts where possible etc)
  • spec compatible
  • haxe 3.1.3 compatible
  • supports all targets

###targets:

Compatible targets, passing all tests (on 3.2 current):

  • js
  • neko
  • cpp

Targets compiling, but not passing: Failing tests are related to negative int values, will be addressed.

  • php (13/72 fail)
  • python (4/72 fail)
  • java (5/72 fail)
  • swf (4/72 fail)

Targets not compiling:

  • csharp (@.value errors, will investigate)

###todo:

  • Lower footprint where possible (BytesData wrapping atm)
  • Endianness handling is not fully yet
    • structure is set up for it, some are done, but ArrayBufferIO should implement all cases
    • unit tests for endianness correctness and usage
    • defaults to little endian or underlying platform/haxe code
  • add unit tests for DataView examples
  • use haxe.unit for agnostic tests instead of moxha
  • throughput performance tests for regression

Structure:

  • All IO operations go through the ArrayBufferIO path only, this allows for platform specific+endian changing code to be easy to maintain, and not scattered across the rest.
  • on JS targets where types are native, those are used instead
  • where possible (c++/neko) fast/direct memory access is used

Included Types:

###Differences with spec

  • (will implement in future) Spec allows Type1.set(Type2) and new Type1(Type2), with conversion between bytes

Contributors

Thanks to the following contributors for their input over time:

  • Hugh Sanderson (Original ByteArray, nme code)
  • Thomas Hourdel (Original Unit test code from spec)
  • Michael Bickel (Code contributions and sparring)
  • Joshua Granick (Work on lime versions)
  • Nicolas Cannasse (Advice and feedback)

License

MIT Licensed See LICENSE.md

About

TypedArray implementation for haxe

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages