use io; // Reads from a stream into a buffer at specified offset fn pread(s: io::handle, buf: []u8, off: io::off) (size | io::EOF | io::error) = { io::seek(s, off, io::whence::SET)?; return io::read(s, buf)?; }; // Writes into a stream from a buffer at specified offset fn pwrite(s: io::handle, buf: const []u8, off: io::off) (size | io::error) = { io::seek(s, off, io::whence::SET)?; return io::write(s, buf)?; };