ProxySource¶
Base interface for all supported sources in Proxy and are not NDim objects. For example, a file, a memory buffer, a network resource, etc. For n-dimemsional ones, see ProxyNDSource.
- class blosc2.ProxySource[source]¶
Base interface for sources of Proxy that are not NDim objects.
- Attributes:
Methods
aget_chunk
(nchunk)Return the compressed chunk in
self
asynchronously.get_chunk
(nchunk)Return the compressed chunk in
self
.- async aget_chunk(nchunk: int) bytes [source]¶
Return the compressed chunk in
self
asynchronously.- Parameters:
nchunk¶ (int) – The index of the chunk to retrieve.
- Returns:
out – The compressed chunk.
- Return type:
bytes object
Notes
This method is optional and only available if the source has an async aget_chunk method.
- abstract get_chunk(nchunk: int) bytes [source]¶
Return the compressed chunk in
self
.- Parameters:
nchunk¶ (int) – The index of the chunk to retrieve.
- Returns:
out – The compressed chunk.
- Return type:
bytes object
- abstract property chunksize: tuple¶
The chunksize of the source.
- property cparams: CParams¶
The compression parameters of the source.
This property is optional and can be overridden if the source has a different compression configuration.
- abstract property nbytes: int¶
The total number of bytes in the source.
- abstract property typesize: int¶
The typesize of the source.