Skip to content

Revert back to emulate ZipExtFile.seek#111

Merged
willmcgugan merged 3 commits intoPyFilesystem:masterfrom
althonos:fix-zipfs
Nov 15, 2017
Merged

Revert back to emulate ZipExtFile.seek#111
willmcgugan merged 3 commits intoPyFilesystem:masterfrom
althonos:fix-zipfs

Conversation

@althonos
Copy link
Member

Using the lower level interface is:

  • highly implementation-specific
  • harder to understand
  • generating bugs

This PR reverts back to a purely emulated seeking feature, i.e. seeking forward by reading.

@coveralls
Copy link

coveralls commented Nov 15, 2017

Coverage Status

Coverage decreased (-0.0003%) to 99.951% when pulling 4fdc2e1 on althonos:fix-zipfs into 92e985c on PyFilesystem:master.

@willmcgugan
Copy link
Member

Fair enough. Using the buffer was clever, but obviously complicated things considerably. I imagine the 99% use case would be to read the entire file sequentially anyway.

@althonos
Copy link
Member Author

Yes, the ZIP format does not support random access anyway, so in the end the best practice would be either to read it sequentially or to decompress the archive.

@willmcgugan
Copy link
Member

Thanks. I'll do a release shortly.

@willmcgugan willmcgugan merged commit c27cfd9 into PyFilesystem:master Nov 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants