{"action":"created","issue":{"url":"https://api.github.com/repos/shevek/lzo-java/issues/8","repository_url":"https://api.github.com/repos/shevek/lzo-java","labels_url":"https://api.github.com/repos/shevek/lzo-java/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/shevek/lzo-java/issues/8/comments","events_url":"https://api.github.com/repos/shevek/lzo-java/issues/8/events","html_url":"https://github.com/shevek/lzo-java/issues/8","id":137178046,"number":8,"title":"can't decompressor file","user":{"login":"victoryxs","id":13211501,"avatar_url":"https://avatars.githubusercontent.com/u/13211501?v=3","gravatar_id":"","url":"https://api.github.com/users/victoryxs","html_url":"https://github.com/victoryxs","followers_url":"https://api.github.com/users/victoryxs/followers","following_url":"https://api.github.com/users/victoryxs/following{/other_user}","gists_url":"https://api.github.com/users/victoryxs/gists{/gist_id}","starred_url":"https://api.github.com/users/victoryxs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/victoryxs/subscriptions","organizations_url":"https://api.github.com/users/victoryxs/orgs","repos_url":"https://api.github.com/users/victoryxs/repos","events_url":"https://api.github.com/users/victoryxs/events{/privacy}","received_events_url":"https://api.github.com/users/victoryxs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-29T07:55:47Z","updated_at":"2016-06-09T13:16:38Z","closed_at":null,"body":"I write a simple demo to decompress lzo file\r\n```java\r\npublic class testUnlzo {\r\n\r\n  public static void main(String[] args) throws Exception{\r\n    InputStream in = new FileInputStream(new File(\"C:\\\\Users\\\\victoryxs\\\\Desktop\\\\10.180.244.104_36310_20160218090000_S1_MME.csv.lzo\"));\r\n    LzoAlgorithm algorithm = LzoAlgorithm.LZO1X;\r\n    LzoDecompressor decompressor = LzoLibrary.getInstance().newDecompressor(algorithm, null);\r\n    LzoInputStream stream = new LzoInputStream(in, decompressor);\r\n    OutputStream outputStream = new FileOutputStream(new File(\"C:\\\\Users\\\\victoryxs\\\\Desktop\\\\10.180.244.104_36310_20160218090000_S1_MME.csv\"));\r\n    int read = 0;\r\n    byte[] bytes = new byte[1024];\r\n\r\n    while ((read = stream.read(bytes)) != -1) {\r\n      outputStream.write(bytes, 0, read);\r\n    }\r\n    outputStream.close();\r\n    stream.close();\r\n  }\r\n}\r\n```\r\n\r\nbut the error is\r\n```\r\n2016-02-29 15:53:28,279 (main) [INFO - org.anarres.lzo.LzoInputStream.logState(LzoInputStream.java:111)] \r\n\r\n2016-02-29 15:53:28,283 (main) [INFO - org.anarres.lzo.LzoInputStream.logState(LzoInputStream.java:112)] IndexOutOfBoundsException: java.lang.ArrayIndexOutOfBoundsException: 0 Input buffer size=854554\r\n2016-02-29 15:53:28,285 (main) [INFO - org.anarres.lzo.LzoInputStream.logState(LzoInputStream.java:113)] IndexOutOfBoundsException: java.lang.ArrayIndexOutOfBoundsException: 0 Output buffer pos=0; length=0; size=0\r\nException in thread \"main\" java.io.IOException: java.lang.ArrayIndexOutOfBoundsException: 0\r\n\tat org.anarres.lzo.LzoInputStream.decompress(LzoInputStream.java:156)\r\n\tat org.anarres.lzo.LzoInputStream.readBlock(LzoInputStream.java:133)\r\n\tat org.anarres.lzo.LzoInputStream.fill(LzoInputStream.java:119)\r\n\tat org.anarres.lzo.LzoInputStream.read(LzoInputStream.java:102)\r\n\tat org.anarres.lzo.LzoInputStream.read(LzoInputStream.java:97)\r\n\tat testUnlzo.main(testUnlzo.java:26)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:606)\r\n\tat com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)\r\nCaused by: java.lang.ArrayIndexOutOfBoundsException: 0\r\n\tat org.anarres.lzo.LzoDecompressor1x.decompress(LzoDecompressor1x.java:7921)\r\n\tat org.anarres.lzo.LzoDecompressor1x.decompress(LzoDecompressor1x.java:8336)\r\n\tat org.anarres.lzo.LzoInputStream.decompress(LzoInputStream.java:142)\r\n\t... 10 more\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/shevek/lzo-java/issues/comments/224891010","html_url":"https://github.com/shevek/lzo-java/issues/8#issuecomment-224891010","issue_url":"https://api.github.com/repos/shevek/lzo-java/issues/8","id":224891010,"user":{"login":"victoryxs","id":13211501,"avatar_url":"https://avatars.githubusercontent.com/u/13211501?v=3","gravatar_id":"","url":"https://api.github.com/users/victoryxs","html_url":"https://github.com/victoryxs","followers_url":"https://api.github.com/users/victoryxs/followers","following_url":"https://api.github.com/users/victoryxs/following{/other_user}","gists_url":"https://api.github.com/users/victoryxs/gists{/gist_id}","starred_url":"https://api.github.com/users/victoryxs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/victoryxs/subscriptions","organizations_url":"https://api.github.com/users/victoryxs/orgs","repos_url":"https://api.github.com/users/victoryxs/repos","events_url":"https://api.github.com/users/victoryxs/events{/privacy}","received_events_url":"https://api.github.com/users/victoryxs/received_events","type":"User","site_admin":false},"created_at":"2016-06-09T13:16:38Z","updated_at":"2016-06-09T13:16:38Z","body":"yes，use lzopinputstream to instead of lzoinputstream"}}
{"actor":{"display_login":"victoryxs"}}