Use constants for compression.
Fix: increase file to full 4096-byte sector size.
Bug introduced in 9b8b434b32.
Append zeroes to the last written sector.
Note: does not yet zero freed sectors.
Fix: don't overwrite used sectors, even if file header is wrong.
Update tests to allow more flexibility in the free-sector algorithm.
Truncate file if last chunk is decreased in size.
Added test for this scenario.
Zero padding of unused bytes after writing a chunk.
Add test: moving an overlapping chunk will not zero the freed sector.
Also reorder tests 80 & 81.
Fix: Unused sectors are zeroed after deleting a chunk.
Fix bug in test92DeleteZeroPadding().
Maybe we should have tests to test the tests :).
General code cleanup, inspired by PEP 8.
* constants are now defined at the module level (with class variables as alias for backward compatibility).
* Use SECTOR_LENGTH constant.
* make init_header, parse_header and parse_chunk_headers methods non-public.
* Make ChunkMatadata class public.
* Expose metadata parameter public.
* Add comments where necessary.
* Deprecate get_chunks and get_chunk_coords in favour of get_metadata().
* Expose more detailed read and write methods: get_blockdata(), get_nbt(), get_chunk() and write_blockdata(), write_chunk().
* Note the get_chunk may be change to return a Chunk() object later, and that get_nbt() should be used to retain the current behaviour.
bug fix: support writing to previously 0-byte files.
Add tests for a truncated file.
Rename tests in ReadWriteTest class.
Remove old comments.
Python 2.7 support.
Python 2.6 is not yet supported (due to limitations in unittest).