Column encoding and decoding in Rust