Closed grimbough closed 1 year ago
Why does this not work?
library(Rarr) tf <- file.path(tempdir(), "strings.zr") x <- matrix(LETTERS, ncol = 2) write_zarr_array(x, tf, chunk_dim = c(5,2), nchar = 1) read_zarr_array(tf) #> Error in .format_chunk(decompressed_chunk, metadata, alt_chunk_dim): Decompresed data doesn't match expected chunk size.
Because writeBin() adds null terminators to the strings, so they are actually of length 2 rather than 1.
writeBin()
Why does this not work?