Lets explore how to read contents of a binary file and print it out in stdout. To do this we will use Dir.readFileAlloc() function. Lets first save a demo text file as test.txt in the same folder as where the program lives and have some lorem ipsum in it. (We will be using a text file to test this out, but the API will work for any binary file. Just trust me.)

// filestdio_bin__main.zig

const std = @import("std");

pub fn main(init: std.process.Init) !void {

var stderr_buffer: [1024]u8 = undefined;