{"action":"opened","issue":{"url":"https://api.github.com/repos/birchroad/node-jspack/issues/12","repository_url":"https://api.github.com/repos/birchroad/node-jspack","labels_url":"https://api.github.com/repos/birchroad/node-jspack/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/birchroad/node-jspack/issues/12/comments","events_url":"https://api.github.com/repos/birchroad/node-jspack/issues/12/events","html_url":"https://github.com/birchroad/node-jspack/issues/12","id":368968010,"node_id":"MDU6SXNzdWUzNjg5NjgwMTA=","number":12,"title":"not packing 'signed long'","user":{"login":"pstanton","id":11416090,"node_id":"MDQ6VXNlcjExNDE2MDkw","avatar_url":"https://avatars1.githubusercontent.com/u/11416090?v=4","gravatar_id":"","url":"https://api.github.com/users/pstanton","html_url":"https://github.com/pstanton","followers_url":"https://api.github.com/users/pstanton/followers","following_url":"https://api.github.com/users/pstanton/following{/other_user}","gists_url":"https://api.github.com/users/pstanton/gists{/gist_id}","starred_url":"https://api.github.com/users/pstanton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pstanton/subscriptions","organizations_url":"https://api.github.com/users/pstanton/orgs","repos_url":"https://api.github.com/users/pstanton/repos","events_url":"https://api.github.com/users/pstanton/events{/privacy}","received_events_url":"https://api.github.com/users/pstanton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-11T06:16:39Z","updated_at":"2018-10-11T06:16:39Z","closed_at":null,"author_association":"NONE","body":"I'm hoping this is user error but I am not getting expected results trying to pack a signed long (8 byte integer), my test case value is `579`. From the documentation, I assume 'q' is the correct format, and I'm working in Big Endian. My \"other\" program gives me `[0, 0, 0, 0, 0, 0, 2, 67]`. using 'i', 'I', 'l' and 'L' I get `[0, 0, 2, 67]` as expected, however using the 8 byte formats I just get zeros...\r\n\r\n```\r\nconsole.log(\"pack >i 579\", jspack.Pack(\">i\", [579]));\r\nconsole.log(\"pack >I 579\", jspack.Pack(\">I\", [579]));\r\nconsole.log(\"pack >l 579\", jspack.Pack(\">l\", [579]));\r\nconsole.log(\"pack >L 579\", jspack.Pack(\">L\", [579]));\r\nconsole.log(\"pack >q 579\", jspack.Pack(\">q\", [579]));\r\nconsole.log(\"pack <q 579\", jspack.Pack(\"<q\", [579]));\r\nconsole.log(\"pack >Q 579\", jspack.Pack(\">Q\", [579]));\r\nconsole.log(\"pack >f 579\", jspack.Pack(\">f\", [579]));\r\nconsole.log(\"pack >d 579\", jspack.Pack(\">d\", [579]));\r\n```\r\n\r\noutput:\r\n\r\n> pack >i 579 (4) [0, 0, 2, 67]\r\n> pack >I 579 (4) [0, 0, 2, 67]\r\n> pack >l 579 (4) [0, 0, 2, 67]\r\n> pack >L 579 (4) [0, 0, 2, 67]\r\n> pack >q 579 (8) [0, 0, 0, 0, 0, 0, 0, 0]\r\n> pack <q 579 (8) [0, 0, 0, 0, 0, 0, 0, 0]\r\n> pack >Q 579 (8) [0, 0, 0, 0, 0, 0, 0, 0]\r\n> pack >f 579 (4) [68, 16, 192, 0]\r\n> pack >d 579 (8) [64, 130, 24, 0, 0, 0, 0, 0]\r\n\r\nis this a bug or am i doing it wrong?"}}
{"actor":{"display_login":"pstanton"}}