{"action":"opened","issue":{"number":190,"created_at":"2011-10-09T15:41:47Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"Scope of Change\n====\nTo complement the input and output streams reading bytes from the underlying\ndata sources, Reader and Writer classes will take care of reading formats\ndefined ontop of these.\n\n\nRationale\n====\nSeparate binary data and formatted data such as strings, as prerequisite for\nUnicode support.\n\n\nFunctionality\n====\nThe basics classes are io.streams.Reader and io.streams.Writer. These \nclasses work on input and output streams, respectively.\n\n<summary>\nWhile streams are named [SOURCE][DIRECTION]Stream and always work on\nbinary untyped data, readers and writers are named [FORMAT][OPERATION] \nand work on typed data.\n</summary>\n\nReader\n----\nTextReader - reads text\n\n```php\n<?php\n  $t= new TextReader(new InputStream(...)[, 'iso-8859-1']);\n  $t->read();\n  $t->readLine();\n?>\n```\n\nBinaryReader - reads binary data. See unpack()\n\n```php\n<?php\n  $t= new BinaryReader(new InputStream(...));\n  $t->read();\n  $t->readString();\n  $t->readInt32();\n?>\n```\n\nWriter\n----\nTextWriter - writes text\n\n```php\n<?php\n  $t= new TextWriter(new OutputStream(...)[, 'iso-8859-1']);\n  $t->write($data);\n  $t->writeLine($data);\n?>\n```\n\nBinaryWriter - writes binary data. See pack()\n\n```php\n<?php\n  $t= new BinaryWriter(new OutputStream(...));\n  $t->write($data);\n  $t->writeString('...');\n  $t->writeInt32(1);\n?>\n```\n\n\nSecurity considerations\n====\nn/a\n\n\nSpeed impact\n====\nn/a\n\n\nDependencies\n====\nNone.\n\n\nRelated documents\n====\nNone.\n\nComments\n====\n\n<EOF>\n","comments":0,"title":"RFC 0190: Readers and Writers","updated_at":"2011-10-09T15:41:47Z","url":"https://api.github.com/repos/thekid/rfc/issues/190","id":1856697,"assignee":null,"milestone":null,"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/26f07e3b262e9a80436f368cb11bd0c2?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/thekid","id":696742,"login":"thekid"},"html_url":"https://github.com/thekid/rfc/issues/190","labels":[],"state":"open"},"legacy":{"number":190,"action":"opened","issue":1856697}}