Defined if Field has member assumeFieldsHaveZeroShift.
import mir.ndslice.iterator: FieldIterator; ushort[10] data; auto f = FieldIterator!(BitpackField!(ushort*, 6))(0, BitpackField!(ushort*, 6)(data.ptr)); f[0] = cast(ushort) 31; f[1] = cast(ushort) 13; f[2] = cast(ushort) 8; f[3] = cast(ushort) 43; f[4] = cast(ushort) 28; f[5] = cast(ushort) 63; f[6] = cast(ushort) 39; f[7] = cast(ushort) 23; f[8] = cast(ushort) 44; assert(f[0] == 31); assert(f[1] == 13); assert(f[2] == 8); assert(f[3] == 43); assert(f[4] == 28); assert(f[5] == 63); assert(f[6] == 39); assert(f[7] == 23); assert(f[8] == 44); assert(f[9] == 0); assert(f[10] == 0); assert(f[11] == 0);
BitpackField is used by bitpack.