{"action":"created","issue":{"url":"https://api.github.com/repos/krzyzanowskim/ObjectivePGP/issues/14","labels_url":"https://api.github.com/repos/krzyzanowskim/ObjectivePGP/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/krzyzanowskim/ObjectivePGP/issues/14/comments","events_url":"https://api.github.com/repos/krzyzanowskim/ObjectivePGP/issues/14/events","html_url":"https://github.com/krzyzanowskim/ObjectivePGP/issues/14","id":63500655,"number":14,"title":"Can't encrypt file","user":{"login":"electrolobzik","id":5470898,"avatar_url":"https://avatars.githubusercontent.com/u/5470898?v=3","gravatar_id":"","url":"https://api.github.com/users/electrolobzik","html_url":"https://github.com/electrolobzik","followers_url":"https://api.github.com/users/electrolobzik/followers","following_url":"https://api.github.com/users/electrolobzik/following{/other_user}","gists_url":"https://api.github.com/users/electrolobzik/gists{/gist_id}","starred_url":"https://api.github.com/users/electrolobzik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/electrolobzik/subscriptions","organizations_url":"https://api.github.com/users/electrolobzik/orgs","repos_url":"https://api.github.com/users/electrolobzik/repos","events_url":"https://api.github.com/users/electrolobzik/events{/privacy}","received_events_url":"https://api.github.com/users/electrolobzik/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-22T07:03:17Z","updated_at":"2015-11-10T10:33:35Z","closed_at":null,"body":"I am trying to encrypt 200kb file (jpg):\r\n\r\n```swift\r\n\r\nfunc encryptFile(filename: String) -> String {\r\n        \r\n        var error: NSError?\r\n        \r\n        let fileContent = NSData(contentsOfFile: filename)\r\n        \r\n        var encryptedData = opgp.encryptData(fileContent, usingPublicKey:currentKey, armored:true, error:&error)\r\n        if encryptedData != nil {\r\n            NSLog(\"file encryption success\")\r\n            encryptedData.writeToFile(filename + \".gpg\", atomically: true)\r\n        }\r\n        \r\n        if error == nil {\r\n            return \"OK\"\r\n        } else {\r\n            return \"error: \\(error)\"\r\n        }\r\n    }\r\n\r\n```\r\n\r\nAs result I am getting error:\r\n\r\n```\r\nOptional(Error Domain=BZIP2 Code=0 \"BZ2_bzCompress failed\" UserInfo=0x7fe7fb100df0 {NSLocalizedDescription=BZ2_bzCompress failed})\r\n```\r\n\r\nWhen I try to encrypt simple short text it works fine.\r\n\r\nHow should I encrypt file with the library? Thank you."},"comment":{"url":"https://api.github.com/repos/krzyzanowskim/ObjectivePGP/issues/comments/155383367","html_url":"https://github.com/krzyzanowskim/ObjectivePGP/issues/14#issuecomment-155383367","issue_url":"https://api.github.com/repos/krzyzanowskim/ObjectivePGP/issues/14","id":155383367,"user":{"login":"krzyzanowskim","id":758033,"avatar_url":"https://avatars.githubusercontent.com/u/758033?v=3","gravatar_id":"","url":"https://api.github.com/users/krzyzanowskim","html_url":"https://github.com/krzyzanowskim","followers_url":"https://api.github.com/users/krzyzanowskim/followers","following_url":"https://api.github.com/users/krzyzanowskim/following{/other_user}","gists_url":"https://api.github.com/users/krzyzanowskim/gists{/gist_id}","starred_url":"https://api.github.com/users/krzyzanowskim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krzyzanowskim/subscriptions","organizations_url":"https://api.github.com/users/krzyzanowskim/orgs","repos_url":"https://api.github.com/users/krzyzanowskim/repos","events_url":"https://api.github.com/users/krzyzanowskim/events{/privacy}","received_events_url":"https://api.github.com/users/krzyzanowskim/received_events","type":"User","site_admin":false},"created_at":"2015-11-10T10:33:35Z","updated_at":"2015-11-10T10:33:35Z","body":"Check if this https://github.com/krzyzanowskim/ObjectivePGP/pull/31 fixed the issue"}}