# I/O in Plywood

DevFeed: [I/O in Plywood](<https://devfeed.tech/articles/i-o-in-plywood-21016.md>)

Original publisher: [Read original article](<https://preshing.com/20200708/io-in-plywood>)

Author: Jeff Preshing

Published: 2020-07-08T12:15:00Z

Content type: article

Language: en

Sources: [Jeff Preshing](<https://devfeed.tech/sources/jeff-preshing.md>)

Topics: [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [IO](<https://devfeed.tech/topics/io.md>), [cross-platform](<https://devfeed.tech/topics/cross-platform.md>), [Framework](<https://devfeed.tech/topics/framework.md>), [Library](<https://devfeed.tech/topics/library.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>)

Tags: [blog-post](<https://devfeed.tech/tags/blog-post.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [cross-platform](<https://devfeed.tech/tags/cross-platform.md>), [framework](<https://devfeed.tech/tags/framework.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [performance](<https://devfeed.tech/tags/performance.md>)

## AI overview

This article introduces Plywood, an open-source C++ framework with a cross-platform I/O API. It explains how Plywood handles application-level concerns such as buffering, data conversion, and performance tuning, and presents its I/O system as an alternative to the standard C and C++ runtime libraries. The article also begins examining buffered raw-byte output to standard output.

## Source excerpt

Plywood is an open-source C++ framework I released a few weeks ago. It includes, among other things, a runtime module that exposes a cross-platform API for I/O, memory, threads, process management and more. This post is about the I/O part. For those who don't know, I/O stands for input/output, and refers to the part of a computer system that either writes serialized data to or reads serialized data from an external interface. The external interface could be a storage device, pipe, network connection or any other type of communication channel. Typically, it's the operating system's responsibility to provide low-level I/O services to an application. But there's still plenty of work that needs to happen at the application level, such as buffering, data conversion, performance tuning and exposing an interface that makes life easier on application programmers. That's where Plywood's I/O system comes in. Of course, standard C++ already comes with its own input/output library, as does the standard C runtime, and most C and C++ programmers are quite familiar with those libraries. Plywood's I/O system is meant serve as an alternative to those libraries. Those libraries were originally developed in 1984 and the early 1970s, respectively. They've stood the test of time incredibly well, but I don't think it's outrageous to suggest that, hey, maybe some innovation is possible here. To be clear, when you build a project using Plywood, you aren't required to use Plywood's I/O system - you can still use the standard C or C++ runtime library, if you prefer. I'm sure this blog post will seem dry for some (or many) readers - but not for me! I like this topic, and I'm willing bet that there are other low-level I/O wonks out there who will find it interesting as well. So let's jump in. Writing Raw Bytes to Standard Output The following program writes "Hello!\n" to standard output as a raw sequence of 7 bytes. No newline conversion or character encoding conversion is performed. Writing t