i'm trying to pass an unknown length array buffer to a function, like this:
const byte_buf: []u8 = allocator.alloc(u8, 4) catch |err| {
std.log.err("failed to allocate byte buf! {s}", .{@errorName(err)});
return ReaderError.AllocFailure;
};
try self.readByteArr(byte_buf, 4);
the function that takes byte_buf is of type []u8. how would i write to this byte_buf from the called function?