{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/pbf/issues/69","repository_url":"https://api.github.com/repos/mapbox/pbf","labels_url":"https://api.github.com/repos/mapbox/pbf/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/pbf/issues/69/comments","events_url":"https://api.github.com/repos/mapbox/pbf/issues/69/events","html_url":"https://github.com/mapbox/pbf/issues/69","id":188997199,"number":69,"title":"nested packed enums not handled properly","user":{"login":"tyrasd","id":1927298,"avatar_url":"https://avatars.githubusercontent.com/u/1927298?v=3","gravatar_id":"","url":"https://api.github.com/users/tyrasd","html_url":"https://github.com/tyrasd","followers_url":"https://api.github.com/users/tyrasd/followers","following_url":"https://api.github.com/users/tyrasd/following{/other_user}","gists_url":"https://api.github.com/users/tyrasd/gists{/gist_id}","starred_url":"https://api.github.com/users/tyrasd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tyrasd/subscriptions","organizations_url":"https://api.github.com/users/tyrasd/orgs","repos_url":"https://api.github.com/users/tyrasd/repos","events_url":"https://api.github.com/users/tyrasd/events{/privacy}","received_events_url":"https://api.github.com/users/tyrasd/received_events","type":"User","site_admin":false},"labels":[{"id":75033406,"url":"https://api.github.com/repos/mapbox/pbf/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":{"login":"kjvalencik","id":2471970,"avatar_url":"https://avatars.githubusercontent.com/u/2471970?v=3","gravatar_id":"","url":"https://api.github.com/users/kjvalencik","html_url":"https://github.com/kjvalencik","followers_url":"https://api.github.com/users/kjvalencik/followers","following_url":"https://api.github.com/users/kjvalencik/following{/other_user}","gists_url":"https://api.github.com/users/kjvalencik/gists{/gist_id}","starred_url":"https://api.github.com/users/kjvalencik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjvalencik/subscriptions","organizations_url":"https://api.github.com/users/kjvalencik/orgs","repos_url":"https://api.github.com/users/kjvalencik/repos","events_url":"https://api.github.com/users/kjvalencik/events{/privacy}","received_events_url":"https://api.github.com/users/kjvalencik/received_events","type":"User","site_admin":false},"assignees":[{"login":"kjvalencik","id":2471970,"avatar_url":"https://avatars.githubusercontent.com/u/2471970?v=3","gravatar_id":"","url":"https://api.github.com/users/kjvalencik","html_url":"https://github.com/kjvalencik","followers_url":"https://api.github.com/users/kjvalencik/followers","following_url":"https://api.github.com/users/kjvalencik/following{/other_user}","gists_url":"https://api.github.com/users/kjvalencik/gists{/gist_id}","starred_url":"https://api.github.com/users/kjvalencik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjvalencik/subscriptions","organizations_url":"https://api.github.com/users/kjvalencik/orgs","repos_url":"https://api.github.com/users/kjvalencik/repos","events_url":"https://api.github.com/users/kjvalencik/events{/privacy}","received_events_url":"https://api.github.com/users/kjvalencik/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2016-11-13T21:44:11Z","updated_at":"2016-11-14T21:02:53Z","closed_at":null,"body":"I'm trying to read a pbf with a packed repeated enum field (as [defined](https://github.com/scrosby/OSM-binary/blob/master/src/osmformat.proto#L242-L246) [here](https://github.com/scrosby/OSM-binary/blob/master/src/osmformat.proto#L258). The compiled pbf parser seems odd for that field:\r\n\r\n```javascript\r\nRelation.read = function (pbf, end) {\r\n    return pbf.readFields(Relation._readField, {id: 0, keys: [], vals: [], info: null, roles_sid: [], memids: [], types: 0}, end);\r\n};\r\nRelation._readField = function (tag, obj, pbf) {\r\n    […]\r\n    else if (tag === 10) obj.types.push(pbf.readVarint());\r\n};\r\n```\r\n\r\nShouldn't the default value for the `types` field be an empty array `[]` (instead of `0`), and the data be read via something like `pbf.readPackedVarint(obj.types);` (instead of `obj.types.push(pbf.readVarint());`)?"},"comment":{"url":"https://api.github.com/repos/mapbox/pbf/issues/comments/260461654","html_url":"https://github.com/mapbox/pbf/issues/69#issuecomment-260461654","issue_url":"https://api.github.com/repos/mapbox/pbf/issues/69","id":260461654,"user":{"login":"tyrasd","id":1927298,"avatar_url":"https://avatars.githubusercontent.com/u/1927298?v=3","gravatar_id":"","url":"https://api.github.com/users/tyrasd","html_url":"https://github.com/tyrasd","followers_url":"https://api.github.com/users/tyrasd/followers","following_url":"https://api.github.com/users/tyrasd/following{/other_user}","gists_url":"https://api.github.com/users/tyrasd/gists{/gist_id}","starred_url":"https://api.github.com/users/tyrasd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tyrasd/subscriptions","organizations_url":"https://api.github.com/users/tyrasd/orgs","repos_url":"https://api.github.com/users/tyrasd/repos","events_url":"https://api.github.com/users/tyrasd/events{/privacy}","received_events_url":"https://api.github.com/users/tyrasd/received_events","type":"User","site_admin":false},"created_at":"2016-11-14T21:02:53Z","updated_at":"2016-11-14T21:02:53Z","body":"Yes, the solution in #71 works for me. Thanks!"}}
{"actor":{"display_login":"tyrasd"}}