visualizer.rs: fn decode