FolderItem.length is a UInt64
MemoryBlock.size is an Integer
BinaryStream.BytePosition is a UInt64
BinaryStream.Length is a UInt64
BinaryStream.Read(ByteCount as Integer...)
It means code like this:
var bs as BinaryStream
[...]
var data as String = bs.read(bs.length)
throws as complier warning. The compiler warning is incorrect, too, as it says
Converting from UInt64 to Integer causes the sign information to be lost, which can lead to unexpected results
The conversion is actually sign-preserving, but it might cause an overflow.
IIRC, the reason MemoryBlock uses Integer is to match the bitness of the OS that you’re running on, so you can’t create a 16TB memoryblock on a 32-bit OS.
I agree that it’s he length parameter of the read method should be a uint64 though.