{"action":"created","issue":{"url":"https://api.github.com/repos/klauspost/dedup/issues/1","labels_url":"https://api.github.com/repos/klauspost/dedup/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/klauspost/dedup/issues/1/comments","events_url":"https://api.github.com/repos/klauspost/dedup/issues/1/events","html_url":"https://github.com/klauspost/dedup/issues/1","id":114017053,"number":1,"title":"dedup tar file not smaller at all","user":{"login":"cooljiansir","id":5054250,"avatar_url":"https://avatars.githubusercontent.com/u/5054250?v=3","gravatar_id":"","url":"https://api.github.com/users/cooljiansir","html_url":"https://github.com/cooljiansir","followers_url":"https://api.github.com/users/cooljiansir/followers","following_url":"https://api.github.com/users/cooljiansir/following{/other_user}","gists_url":"https://api.github.com/users/cooljiansir/gists{/gist_id}","starred_url":"https://api.github.com/users/cooljiansir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cooljiansir/subscriptions","organizations_url":"https://api.github.com/users/cooljiansir/orgs","repos_url":"https://api.github.com/users/cooljiansir/repos","events_url":"https://api.github.com/users/cooljiansir/events{/privacy}","received_events_url":"https://api.github.com/users/cooljiansir/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-29T10:04:06Z","updated_at":"2015-10-30T03:25:24Z","closed_at":null,"body":"Hello! I use the following code to dedup a file:\r\nI use an ubuntu docker image (tar file 168M)\r\nbut get 100%\r\nI don't know why? wrong code? or tar file is not suitable?\r\n```go\r\n\r\npackage main\r\n\r\nimport (\r\n        \"bytes\"\r\n        \"io\"\r\n        \"io/ioutil\"\r\n        \"fmt\"\r\n        \"github.com/klauspost/dedup\"\r\n)\r\n\r\n\r\nfunc main() {\r\n        data := bytes.Buffer{}\r\n        const size = 64 << 10\r\n\r\n        input,err := ioutil.ReadFile(\"input\")\r\n        if err != nil {\r\n                panic(err)\r\n        }\r\n\r\n        w,err := dedup.NewStreamWriter(&data,dedup.ModeFixed,size,300 << 20) //300M at most\r\n        if err != nil {\r\n                panic(err)\r\n        }\r\n        inputbuff := bytes.NewBuffer(input)\r\n        io.Copy(w,inputbuff)\r\n        err = w.Close()\r\n        if err != nil {\r\n                panic(err)\r\n        }\r\n\r\n        err = ioutil.WriteFile(\"output\", data.Bytes(), 0644)\r\n            if err != nil {\r\n                panic(err)\r\n        }\r\n        fmt.Printf(\"Fixed Data size:%d - %d %%\\n\",data.Len(),data.Len()*100/len(input))\r\n}\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/klauspost/dedup/issues/comments/152402961","html_url":"https://github.com/klauspost/dedup/issues/1#issuecomment-152402961","issue_url":"https://api.github.com/repos/klauspost/dedup/issues/1","id":152402961,"user":{"login":"cooljiansir","id":5054250,"avatar_url":"https://avatars.githubusercontent.com/u/5054250?v=3","gravatar_id":"","url":"https://api.github.com/users/cooljiansir","html_url":"https://github.com/cooljiansir","followers_url":"https://api.github.com/users/cooljiansir/followers","following_url":"https://api.github.com/users/cooljiansir/following{/other_user}","gists_url":"https://api.github.com/users/cooljiansir/gists{/gist_id}","starred_url":"https://api.github.com/users/cooljiansir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cooljiansir/subscriptions","organizations_url":"https://api.github.com/users/cooljiansir/orgs","repos_url":"https://api.github.com/users/cooljiansir/repos","events_url":"https://api.github.com/users/cooljiansir/events{/privacy}","received_events_url":"https://api.github.com/users/cooljiansir/received_events","type":"User","site_admin":false},"created_at":"2015-10-30T03:25:24Z","updated_at":"2015-10-30T03:25:24Z","body":"Yes,I tried 1K ,Fixed\r\nGot 97%"}}