{"action":"created","issue":{"url":"https://api.github.com/repos/BioJulia/Libz.jl/issues/9","labels_url":"https://api.github.com/repos/BioJulia/Libz.jl/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/BioJulia/Libz.jl/issues/9/comments","events_url":"https://api.github.com/repos/BioJulia/Libz.jl/issues/9/events","html_url":"https://github.com/BioJulia/Libz.jl/issues/9","id":122880684,"number":9,"title":"some gz files cannot be read correctly","user":{"login":"sfchen","id":12932141,"avatar_url":"https://avatars.githubusercontent.com/u/12932141?v=3","gravatar_id":"","url":"https://api.github.com/users/sfchen","html_url":"https://github.com/sfchen","followers_url":"https://api.github.com/users/sfchen/followers","following_url":"https://api.github.com/users/sfchen/following{/other_user}","gists_url":"https://api.github.com/users/sfchen/gists{/gist_id}","starred_url":"https://api.github.com/users/sfchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfchen/subscriptions","organizations_url":"https://api.github.com/users/sfchen/orgs","repos_url":"https://api.github.com/users/sfchen/repos","events_url":"https://api.github.com/users/sfchen/events{/privacy}","received_events_url":"https://api.github.com/users/sfchen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-18T05:14:01Z","updated_at":"2015-12-18T08:42:35Z","closed_at":null,"body":"[R1.fastq.gz](https://github.com/BioJulia/Libz.jl/files/66241/R1.fastq.gz)\r\n\r\nSee attached `R1.fastq.gz`, this file cannot be read correctly using Libz. This file has `4476*4` lines, but Libz can only read `38*4` lines then it will report `EOF`.\r\n\r\nIf I gunzip it to R1.fastq, and then zip it using Libz, then it is readable by Libz.  "},"comment":{"url":"https://api.github.com/repos/BioJulia/Libz.jl/issues/comments/165715152","html_url":"https://github.com/BioJulia/Libz.jl/issues/9#issuecomment-165715152","issue_url":"https://api.github.com/repos/BioJulia/Libz.jl/issues/9","id":165715152,"user":{"login":"bicycle1885","id":905683,"avatar_url":"https://avatars.githubusercontent.com/u/905683?v=3","gravatar_id":"","url":"https://api.github.com/users/bicycle1885","html_url":"https://github.com/bicycle1885","followers_url":"https://api.github.com/users/bicycle1885/followers","following_url":"https://api.github.com/users/bicycle1885/following{/other_user}","gists_url":"https://api.github.com/users/bicycle1885/gists{/gist_id}","starred_url":"https://api.github.com/users/bicycle1885/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bicycle1885/subscriptions","organizations_url":"https://api.github.com/users/bicycle1885/orgs","repos_url":"https://api.github.com/users/bicycle1885/repos","events_url":"https://api.github.com/users/bicycle1885/events{/privacy}","received_events_url":"https://api.github.com/users/bicycle1885/received_events","type":"User","site_admin":false},"created_at":"2015-12-18T08:42:35Z","updated_at":"2015-12-18T08:42:35Z","body":"Thank you for your report. This is reproducible in my computer.\r\n\r\nI'm not sure why this happens at the moment, but one solution is using `reset_on_end=true` as follows:\r\n\r\n```julia\r\n    s = ZlibInflateInputStream(open(\"R1.fastq.gz\"))\r\n    @show length(readall(s))\r\n    s = ZlibInflateInputStream(open(\"R1.fastq.gz\"), reset_on_end=true)\r\n    @show length(readall(s))\r\n```\r\n\r\noutput\r\n\r\n    length(readall(s)) = 13206\r\n    length(readall(s)) = 1521399\r\n\r\n\r\nI'll continue to investigate the reason."}}