You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The BinData schema element is really just an XML-friendly encoding for a series of raw bytes, and the ideal Python type for that is bytes. If we make that change, the XML parsing process could perform the base64 decoding and any decompression, but I'm not sure what to do about the BigEndian flag. It would be instructive to look at BioFormats and OMERO code to see how BinData endianness is managed. Numpy users could be accommodated nicely with an __array__ method that returns the bytes object wrapped in np.frombuffer (zero-copy).
Also when we get to XML encoding, our API will need a way to declare what kind of compression the user wants (one setting for all BinData elements in the whole document is probably OK). The Length can be computed from the content, and we can pass along or arbitrarily choose the BigEndian value depending on how we manage it in the dataclass.
The text was updated successfully, but these errors were encountered:
The
BinData
schema element is really just an XML-friendly encoding for a series of raw bytes, and the ideal Python type for that isbytes
. If we make that change, the XML parsing process could perform the base64 decoding and any decompression, but I'm not sure what to do about theBigEndian
flag. It would be instructive to look at BioFormats and OMERO code to see how BinData endianness is managed. Numpy users could be accommodated nicely with an__array__
method that returns the bytes object wrapped innp.frombuffer
(zero-copy).Also when we get to XML encoding, our API will need a way to declare what kind of compression the user wants (one setting for all BinData elements in the whole document is probably OK). The
Length
can be computed from the content, and we can pass along or arbitrarily choose theBigEndian
value depending on how we manage it in the dataclass.The text was updated successfully, but these errors were encountered: