Ilya Yaroshenko via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Sep 2 21:01:34 PDT 2017
On Saturday, 2 September 2017 at 03:29:20 UTC, EntangledQuanta
> On Saturday, 2 September 2017 at 02:49:41 UTC, Ilya Yaroshenko
>> On Friday, 1 September 2017 at 19:39:14 UTC, EntangledQuanta
>>> Is there a way to create a 24-bit int? One that for all
>>> practical purposes acts as such? This is for 24-bit stuff
>>> like audio. It would respect endianness, allow for arrays
>>> int24 that work properly, etc.
>> Probably you are looking for bitpack ndslice topology:
>> sizediff_t data;
>> // creates a packed signed integer slice with max allowed
>> value equal to `2^^24 - 1`.
>> auto packs = data.sliced.bitpack!24;
>> packs has the same API as D arrays
>> Package is Mir Algorithm
> Thanks. Seems useful.
Just added `bytegroup` topology. Released in v0.6.12 (will be
available in DUB after few minutes.)
It is faster for your task then `bitpack`.
More information about the Digitalmars-d-learn