Skip to content

Commit

Permalink
Fix compute_encoded_size() for BitroundCodec incorrectly indicati…
Browse files Browse the repository at this point in the history
…ng various data types were unsupported
  • Loading branch information
LDeakin committed Apr 25, 2024
1 parent 148b70c commit c1f4033
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed
- Fix `compute_encoded_size()` for `BitroundCodec` incorrectly indicating various data types were unsupported

## [0.13.0] - 2024-04-20

### Added
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "zarrs"
version = "0.13.0"
version = "0.13.1"
authors = ["Lachlan Deakin <ljdgit@gmail.com>"]
edition = "2021"
rust-version = "1.75"
Expand Down
17 changes: 14 additions & 3 deletions src/array/codec/array_to_array/bitround/bitround_codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,20 @@ impl ArrayToArrayCodecTraits for BitroundCodec {
) -> Result<ChunkRepresentation, CodecError> {
let data_type = decoded_representation.data_type();
match data_type {
DataType::Float16 | DataType::BFloat16 | DataType::Float32 | DataType::Float64 => {
Ok(decoded_representation.clone())
}
DataType::Float16
| DataType::BFloat16
| DataType::Float32
| DataType::Float64
| DataType::UInt8
| DataType::Int8
| DataType::UInt16
| DataType::Int16
| DataType::UInt32
| DataType::Int32
| DataType::UInt64
| DataType::Int64
| DataType::Complex64
| DataType::Complex128 => Ok(decoded_representation.clone()),
_ => Err(CodecError::UnsupportedDataType(
data_type.clone(),
IDENTIFIER.to_string(),
Expand Down

0 comments on commit c1f4033

Please sign in to comment.