2020-01-26 08:11:56 +01:00
|
|
|
use std::io;
|
|
|
|
|
|
|
|
|
|
use hexyl::{BorderStyle, Printer};
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
let input = vec![
|
|
|
|
|
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();
|
|
|
|
|
|
|
|
|
|
let show_color = true;
|
2022-05-22 14:14:07 -05:00
|
|
|
let show_char_panel = true;
|
|
|
|
|
let show_position_panel = true;
|
2020-01-26 08:11:56 +01:00
|
|
|
let use_squeezing = false;
|
|
|
|
|
let border_style = BorderStyle::Unicode;
|
2022-07-12 11:39:24 -04:00
|
|
|
let columns = 2;
|
2020-01-26 08:11:56 +01:00
|
|
|
|
2022-04-22 15:33:26 -05:00
|
|
|
let mut printer = Printer::new(
|
|
|
|
|
&mut handle,
|
|
|
|
|
show_color,
|
2022-05-22 14:14:07 -05:00
|
|
|
show_char_panel,
|
|
|
|
|
show_position_panel,
|
2022-04-22 15:33:26 -05:00
|
|
|
border_style,
|
|
|
|
|
use_squeezing,
|
2022-07-12 11:39:24 -04:00
|
|
|
columns,
|
2022-04-22 15:33:26 -05:00
|
|
|
);
|
2020-03-09 20:23:46 +01:00
|
|
|
printer.print_all(&input[..]).unwrap();
|
2020-01-26 08:11:56 +01:00
|
|
|
}
|