{"action":"created","issue":{"url":"https://api.github.com/repos/akka/akka/issues/21018","repository_url":"https://api.github.com/repos/akka/akka","labels_url":"https://api.github.com/repos/akka/akka/issues/21018/labels{/name}","comments_url":"https://api.github.com/repos/akka/akka/issues/21018/comments","events_url":"https://api.github.com/repos/akka/akka/issues/21018/events","html_url":"https://github.com/akka/akka/pull/21018","id":167051119,"number":21018,"title":"Byte string parser input for request target parsing","user":{"login":"johanandren","id":666915,"avatar_url":"https://avatars.githubusercontent.com/u/666915?v=3","gravatar_id":"","url":"https://api.github.com/users/johanandren","html_url":"https://github.com/johanandren","followers_url":"https://api.github.com/users/johanandren/followers","following_url":"https://api.github.com/users/johanandren/following{/other_user}","gists_url":"https://api.github.com/users/johanandren/gists{/gist_id}","starred_url":"https://api.github.com/users/johanandren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johanandren/subscriptions","organizations_url":"https://api.github.com/users/johanandren/orgs","repos_url":"https://api.github.com/users/johanandren/repos","events_url":"https://api.github.com/users/johanandren/events{/privacy}","received_events_url":"https://api.github.com/users/johanandren/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-22T13:57:52Z","updated_at":"2016-07-22T14:34:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/akka/akka/pulls/21018","html_url":"https://github.com/akka/akka/pull/21018","diff_url":"https://github.com/akka/akka/pull/21018.diff","patch_url":"https://github.com/akka/akka/pull/21018.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/akka/akka/issues/comments/234560483","html_url":"https://github.com/akka/akka/pull/21018#issuecomment-234560483","issue_url":"https://api.github.com/repos/akka/akka/issues/21018","id":234560483,"user":{"login":"ktoso","id":120979,"avatar_url":"https://avatars.githubusercontent.com/u/120979?v=3","gravatar_id":"","url":"https://api.github.com/users/ktoso","html_url":"https://github.com/ktoso","followers_url":"https://api.github.com/users/ktoso/followers","following_url":"https://api.github.com/users/ktoso/following{/other_user}","gists_url":"https://api.github.com/users/ktoso/gists{/gist_id}","starred_url":"https://api.github.com/users/ktoso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktoso/subscriptions","organizations_url":"https://api.github.com/users/ktoso/orgs","repos_url":"https://api.github.com/users/ktoso/repos","events_url":"https://api.github.com/users/ktoso/events{/privacy}","received_events_url":"https://api.github.com/users/ktoso/received_events","type":"User","site_admin":false},"created_at":"2016-07-22T14:34:10Z","updated_at":"2016-07-22T14:34:10Z","body":"LGTM.\r\n\r\nWarning, crazy idea incoming:\r\n\r\n\r\n```scala\r\ntrait ParserInput extends Any {\r\n ...\r\n```\r\n\r\n```scala\r\nfinal class ByteStringParserInput(val bytes: ByteString) extends AnyVal with ParserInput {\r\n  override def charAt(ix: Int): Char = (bytes(ix) & 0xFF).toChar\r\n  override def length: Int = bytes.size\r\n  override def sliceString(start: Int, end: Int): String = bytes.slice(start, end - start).decodeString(StandardCharsets.ISO_8859_1)\r\n  override def sliceCharArray(start: Int, end: Int): Array[Char] =\r\n    StandardCharsets.ISO_8859_1.decode(bytes.slice(start, end).asByteBuffer).array()\r\n  def getLine(line: Int): String = {\r\n    @tailrec def rec(ix: Int, lineStartIx: Int, lineNr: Int): String =\r\n      if (ix < length)\r\n        if (charAt(ix) == '\\n')\r\n          if (lineNr < line) rec(ix + 1, ix + 1, lineNr + 1)\r\n          else sliceString(lineStartIx, ix)\r\n        else rec(ix + 1, lineStartIx, lineNr)\r\n      else if (lineNr == line) sliceString(lineStartIx, ix) else \"\"\r\n    rec(ix = 0, lineStartIx = 0, lineNr = 1)\r\n  }\r\n\r\n}\r\n```\r\n\r\nzero allocations, yay"}}
{"actor":{"display_login":"ktoso"}}