StackedArray
StackedArray
¶
Bases: Generic[T]
This class cannot be used on its own. Use one of its subclasses
from_stream
classmethod
¶
from_stream(value: ByteStream, ver: Version = Version(0)) -> list[list[T]]
StackedArray8
¶
Bases: StackedArray[T], Generic[T]
[De]serialize a list[list[T]] whose length is indicated by a leading u8 followed by that many u8s
indicating the lengths of each of the nested lists, using the syntax StackedArray8[T]. The length of the outer
list may be fixed to N using the syntax StackedArray8[N][T] which then reads N u8s to determine
the lengths of the nested lists.
For example, StackedArray8[bool8] will read a u8, followed by that many u8s - the sum of these
quantities indicates how many total bool8s will be read.
Essentially, instead of each list's length immediately preceding them, all the lengths for the sub lists are specified right at the start after specifying how many sub lists there are
StackedArray16
¶
Bases: StackedArray[T], Generic[T]
[De]serialize a list[list[T]] whose length is indicated by a leading u16 followed by that many u16s
indicating the lengths of each of the nested lists, using the syntax StackedArray16[T]. The length of the outer
list may be fixed to N using the syntax StackedArray16[N][T] which then reads N u16s to determine
the lengths of the nested lists.
For example, StackedArray16[bool8] will read a u16, followed by that many u16s - the sum of these
quantities indicates how many total bool8s will be read.
Essentially, instead of each list's length immediately preceding them, all the lengths for the sub lists are specified right at the start after specifying how many sub lists there are
StackedArray32
¶
Bases: StackedArray[T], Generic[T]
[De]serialize a list[list[T]] whose length is indicated by a leading u32 followed by that many u32s
indicating the lengths of each of the nested lists, using the syntax StackedArray32[T]. The length of the outer
list may be fixed to N using the syntax StackedArray32[N][T] which then reads N u32s to determine
the lengths of the nested lists.
For example, StackedArray32[bool8] will read a u32, followed by that many u32s - the sum of these
quantities indicates how many total bool8s will be read.
Essentially, instead of each list's length immediately preceding them, all the lengths for the sub lists are specified right at the start after specifying how many sub lists there are
StackedArray64
¶
Bases: StackedArray[T], Generic[T]
[De]serialize a list[list[T]] whose length is indicated by a leading u64 followed by that many u64s
indicating the lengths of each of the nested lists, using the syntax StackedArray64[T]. The length of the outer
list may be fixed to N using the syntax StackedArray64[N][T] which then reads N u64s to determine
the lengths of the nested lists.
For example, StackedArray64[bool8] will read a u64, followed by that many u64s - the sum of these
quantities indicates how many total bool8s will be read.
Essentially, instead of each list's length immediately preceding them, all the lengths for the sub lists are specified right at the start after specifying how many sub lists there are
StackedArray128
¶
Bases: StackedArray[T], Generic[T]
[De]serialize a list[list[T]] whose length is indicated by a leading u128 followed by that many u128s
indicating the lengths of each of the nested lists, using the syntax StackedArray128[T]. The length of the outer
list may be fixed to N using the syntax StackedArray128[N][T] which then reads N u128s to determine
the lengths of the nested lists.
For example, StackedArray128[bool8] will read a u128, followed by that many u128s - the sum of these
quantities indicates how many total bool8s will be read.
Essentially, instead of each list's length immediately preceding them, all the lengths for the sub lists are specified right at the start after specifying how many sub lists there are