{"action":"created","issue":{"url":"https://api.github.com/repos/kaitai-io/kaitai_struct_compiler/issues/33","repository_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_compiler","labels_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_compiler/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_compiler/issues/33/comments","events_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_compiler/issues/33/events","html_url":"https://github.com/kaitai-io/kaitai_struct_compiler/issues/33","id":191249997,"number":33,"title":"Are relative positions supported for `pos'?","user":{"login":"tschoening","id":6223655,"avatar_url":"https://avatars.githubusercontent.com/u/6223655?v=3","gravatar_id":"","url":"https://api.github.com/users/tschoening","html_url":"https://github.com/tschoening","followers_url":"https://api.github.com/users/tschoening/followers","following_url":"https://api.github.com/users/tschoening/following{/other_user}","gists_url":"https://api.github.com/users/tschoening/gists{/gist_id}","starred_url":"https://api.github.com/users/tschoening/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tschoening/subscriptions","organizations_url":"https://api.github.com/users/tschoening/orgs","repos_url":"https://api.github.com/users/tschoening/repos","events_url":"https://api.github.com/users/tschoening/events{/privacy}","received_events_url":"https://api.github.com/users/tschoening/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-11-23T11:46:37Z","updated_at":"2016-11-23T16:21:40Z","closed_at":"2016-11-23T15:21:37Z","body":"In #32 I'm using `pos` to read some bytes and first tried to use negative offsets, which failed in Java and Ruby. Both stream abstractions don't support negative offsets.\r\n\r\nhttps://docs.oracle.com/javase/7/docs/api/java/nio/Buffer.html#position(int)\r\n\r\nIs there some supported syntax to move the position relative from the current position in the stream? This doesn't necessarily need to be supported by the compiler, one could easily calc the needed position itself in the KSY file. One would only need the \"current position\". But I couldn't anything in the Wiki for this.\r\n\r\nI think of something like the following:\r\n\r\n      prod_code_hr:\r\n        pos:  _curPos - 8\r\n        type: u2\r\n        enum: prod_code_hr\r\n        doc:  Better human readable version of the prod_code, using standardized 3 letters string.\r\n\r\nThis way you would at least not need to implement negative position calculation in all languages."},"comment":{"url":"https://api.github.com/repos/kaitai-io/kaitai_struct_compiler/issues/comments/262561740","html_url":"https://github.com/kaitai-io/kaitai_struct_compiler/issues/33#issuecomment-262561740","issue_url":"https://api.github.com/repos/kaitai-io/kaitai_struct_compiler/issues/33","id":262561740,"user":{"login":"tschoening","id":6223655,"avatar_url":"https://avatars.githubusercontent.com/u/6223655?v=3","gravatar_id":"","url":"https://api.github.com/users/tschoening","html_url":"https://github.com/tschoening","followers_url":"https://api.github.com/users/tschoening/followers","following_url":"https://api.github.com/users/tschoening/following{/other_user}","gists_url":"https://api.github.com/users/tschoening/gists{/gist_id}","starred_url":"https://api.github.com/users/tschoening/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tschoening/subscriptions","organizations_url":"https://api.github.com/users/tschoening/orgs","repos_url":"https://api.github.com/users/tschoening/repos","events_url":"https://api.github.com/users/tschoening/events{/privacy}","received_events_url":"https://api.github.com/users/tschoening/received_events","type":"User","site_admin":false},"created_at":"2016-11-23T16:21:40Z","updated_at":"2016-11-23T16:21:40Z","body":"If I have something useful finished, I'll think of that. Don't know if I need to check with my company first... I would just fork your formats repo and add my format in a new branch, right?"}}
{"actor":{"display_login":"tschoening"}}