{"action":"created","issue":{"url":"https://api.github.com/repos/readium/readium-sdk/issues/191","labels_url":"https://api.github.com/repos/readium/readium-sdk/issues/191/labels{/name}","comments_url":"https://api.github.com/repos/readium/readium-sdk/issues/191/comments","events_url":"https://api.github.com/repos/readium/readium-sdk/issues/191/events","html_url":"https://github.com/readium/readium-sdk/pull/191","id":102845895,"number":191,"title":"This iFeature/libzip1.0 seek tell fix","user":{"login":"DennisPopovDn","id":5586427,"avatar_url":"https://avatars.githubusercontent.com/u/5586427?v=3","gravatar_id":"","url":"https://api.github.com/users/DennisPopovDn","html_url":"https://github.com/DennisPopovDn","followers_url":"https://api.github.com/users/DennisPopovDn/followers","following_url":"https://api.github.com/users/DennisPopovDn/following{/other_user}","gists_url":"https://api.github.com/users/DennisPopovDn/gists{/gist_id}","starred_url":"https://api.github.com/users/DennisPopovDn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DennisPopovDn/subscriptions","organizations_url":"https://api.github.com/users/DennisPopovDn/orgs","repos_url":"https://api.github.com/users/DennisPopovDn/repos","events_url":"https://api.github.com/users/DennisPopovDn/events{/privacy}","received_events_url":"https://api.github.com/users/DennisPopovDn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":22,"created_at":"2015-08-24T17:09:32Z","updated_at":"2015-09-04T10:35:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/readium/readium-sdk/pulls/191","html_url":"https://github.com/readium/readium-sdk/pull/191","diff_url":"https://github.com/readium/readium-sdk/pull/191.diff","patch_url":"https://github.com/readium/readium-sdk/pull/191.patch"},"body":"This PR implements Tell/Seek support on ZipFileByteStream level, \r\nit implements the idea of rewinding by read operation the underlying libzip structure if libzip zip_source layer doesn't support ZIP_SOURCE_SEEK functionality, no matter whether it is compressed or not.\r\n\r\n```C++\r\nByteStream::size_type ZipFileByteStream::Seek(size_type by, std::ios::seekdir dir)\r\n{\r\n...\r\nif ((_file->src->supports & ZIP_SOURCE_MAKE_COMMAND_BITMASK(ZIP_SOURCE_SEEK)) == 0)     // if the source doesn't support seek operation\r\n    {\r\n        return SeekByRewind(by, whence);    // Emulation of Seek operation by rewind\r\n    }\r\n...\r\n```\r\n\r\nUpdated libzip with seek/tell operations for stored files only.\r\nAfter reviewing the libzip I believe it doesn't make sense to push the Seek/Tell emulation for compressed content inside the zip_source_deflate.c because there could be another compression/decompression algos/layers and the implementation has similar idea of rewinding the file by read/decompress operation.\r\n\r\nNote: I've tested it on VS2013&Windows7 platform"},"comment":{"url":"https://api.github.com/repos/readium/readium-sdk/issues/comments/137699198","html_url":"https://github.com/readium/readium-sdk/pull/191#issuecomment-137699198","issue_url":"https://api.github.com/repos/readium/readium-sdk/issues/191","id":137699198,"user":{"login":"DennisPopovDn","id":5586427,"avatar_url":"https://avatars.githubusercontent.com/u/5586427?v=3","gravatar_id":"","url":"https://api.github.com/users/DennisPopovDn","html_url":"https://github.com/DennisPopovDn","followers_url":"https://api.github.com/users/DennisPopovDn/followers","following_url":"https://api.github.com/users/DennisPopovDn/following{/other_user}","gists_url":"https://api.github.com/users/DennisPopovDn/gists{/gist_id}","starred_url":"https://api.github.com/users/DennisPopovDn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DennisPopovDn/subscriptions","organizations_url":"https://api.github.com/users/DennisPopovDn/orgs","repos_url":"https://api.github.com/users/DennisPopovDn/repos","events_url":"https://api.github.com/users/DennisPopovDn/events{/privacy}","received_events_url":"https://api.github.com/users/DennisPopovDn/received_events","type":"User","site_admin":false},"created_at":"2015-09-04T10:35:05Z","updated_at":"2015-09-04T10:35:05Z","body":"Yes, please add logging.cc file into the project"}}