{"action":"closed","issue":{"url":"https://api.github.com/repos/Cyan4973/lz4/issues/110","labels_url":"https://api.github.com/repos/Cyan4973/lz4/issues/110/labels{/name}","comments_url":"https://api.github.com/repos/Cyan4973/lz4/issues/110/comments","events_url":"https://api.github.com/repos/Cyan4973/lz4/issues/110/events","html_url":"https://github.com/Cyan4973/lz4/issues/110","id":79492128,"number":110,"title":"Sparse file support breaks pipe output on decompression.","user":{"login":"eborisch","id":5131911,"avatar_url":"https://avatars.githubusercontent.com/u/5131911?v=3","gravatar_id":"","url":"https://api.github.com/users/eborisch","html_url":"https://github.com/eborisch","followers_url":"https://api.github.com/users/eborisch/followers","following_url":"https://api.github.com/users/eborisch/following{/other_user}","gists_url":"https://api.github.com/users/eborisch/gists{/gist_id}","starred_url":"https://api.github.com/users/eborisch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eborisch/subscriptions","organizations_url":"https://api.github.com/users/eborisch/orgs","repos_url":"https://api.github.com/users/eborisch/repos","events_url":"https://api.github.com/users/eborisch/events{/privacy}","received_events_url":"https://api.github.com/users/eborisch/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-22T15:15:26Z","updated_at":"2015-05-22T16:08:10Z","closed_at":"2015-05-22T16:08:10Z","body":"On FreeBSD; 'liblz4-129'; installed via portmaster.\r\n\r\nThis used to work, but fails with 129:\r\n```\r\ncat /dev/urandom | lz4c | lz4c -d | cat > /dev/null\r\nError 68 : Skip error (sparse file)\r\n```\r\n\r\nI can make the piped output version work again with --no-sparse on the decompression step; i.e. both of these work:\r\n```\r\ncat /dev/urandom | lz4c | lz4c -d --no-sparse | cat > /dev/null\r\ncat /dev/urandom | lz4c | lz4c -d > /dev/null\r\n```\r\n\r\nIt seems to me that --no-sparse should be the default when outputting to a pipe; and to be compatible with other (bzip2, gzip, etc) filters that don't require an additional flag. This could be accomplished either via stat() and S_ISREG() testing, or by gracefully recovering on a skip error. (My guess is the former will be more straightforward to implement, and the latter a more robust solution for unexpected cases.)"}}