Files

24 lines
692 B
Rust
Raw Permalink Normal View History

use std::io;
2022-09-17 09:46:15 -04:00
use hexyl::{BorderStyle, PrinterBuilder};
fn main() {
2025-08-31 21:21:22 +02:00
let input = [
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44,
0x52, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x44, 0x08, 0x02, 0x00, 0x00, 0x00,
];
let stdout = io::stdout();
let mut handle = stdout.lock();
2022-09-17 09:46:15 -04:00
let mut printer = PrinterBuilder::new(&mut handle)
.show_color(true)
.show_char_panel(true)
.show_position_panel(true)
.with_border_style(BorderStyle::Unicode)
2022-10-03 23:07:52 -04:00
.enable_squeezing(false)
2022-10-04 08:49:19 -04:00
.num_panels(2)
2022-12-07 21:50:12 +01:00
.group_size(1)
2022-09-17 09:46:15 -04:00
.build();
2020-03-09 20:23:46 +01:00
printer.print_all(&input[..]).unwrap();
}