Johan Andersson
0b222aa958
Remove redundant type specification
2018-06-20 01:38:43 +02:00
Johan Andersson
d51a4fc1d0
Fix file name sanitization for incompatible path separators.
...
Zip files can contain both / and \ as separators regardless of the OS and as we want to return a sanitized PathBuf that only supports the OS separator on the let's convert incompatible separators to compatible ones.
If one doesn't do this then PathBufs will be returned that can have entire paths in the file name such as "src\\lib.rs" on Linux/Mac, instead of srv / lib.rs as 3 separate components.
2018-06-20 01:31:46 +02:00
Mathijs van de Nes
38d1699853
Improve reading from non-seekable streams
...
You can now repeatedly call a function to iterate over all files in a
zip. This may give some suboptimal results, but is useful when dealing
with an incoming data stream.
2018-06-16 14:14:34 +02:00
Mathijs van de Nes
602952750e
Update DEFAULT_VERSION
...
Use a more sane 'version made by' as we can write Bzip2 files
2018-05-22 23:36:56 +02:00
Mathijs van de Nes
ab9667aa5c
Properly write 'version needed' in local file header
...
'version made by' was used instead of version needed by accident.
Resolves #72
2018-05-22 23:36:56 +02:00
Mathijs van de Nes
806147ac9e
Fix sanitized_name test for Windows
2018-04-20 13:53:07 +02:00
Mathijs van de Nes
5e8c95e6ed
Make santized_name part of the library
...
It is a common pitfall to use the name as-is during extraction. Adding
this function may prevent some of the issues.
Resolves #65
2018-04-20 13:35:20 +02:00
Mathijs van de Nes
1831edbbdd
Expose the raw file name of a file
...
We still do most operations with normal Strings, but a user can now also get the raw bytes.
Resolves #26
2017-02-12 17:18:40 +01:00
Mathijs van de Nes
49e506c13c
Fix types::System enum
...
Unix had incorrectly assigned the value 1 instead of 3
2016-10-29 12:30:30 +02:00
Mathijs van de Nes
2a3fe099a6
Derive Debug for read::ZipArchive
...
Resolves #15
2016-08-08 17:34:02 +02:00
Mathijs van de Nes
e80213e250
Rename version to version_made_by
...
Also remove System for now
2016-04-27 14:30:00 +02:00
Alexander Koval
1e935672bd
Replace system attribute by enum
2016-04-23 13:12:28 +03:00
Alexander Koval
a16962cd2c
Support for external file attributes
2016-04-23 10:31:54 +03:00
Mathijs van de Nes
d9b83af57c
Large refactoring, mostly of the reader
...
- Combined reader and reader_spec into read
- Alter the iteration protocol for a zip archive
- Modify some names
2015-03-01 11:32:40 +01:00
Mathijs van de Nes
f45a558dac
change #[deriving(..)] to #[derive(..)]
2015-01-04 10:51:14 +01:00
Mathijs van de Nes
bdda4310e4
Implement finding files by name
...
Resolves #2
2014-11-22 19:28:00 +01:00
Mathijs van de Nes
0cd915f185
Split compression from types and pub use ZipFile
2014-09-15 21:33:58 +02:00
Mathijs van de Nes
723e8b0b12
Initial file name/comment encoding support
2014-09-14 17:25:40 +02:00
Mathijs van de Nes
02059ce351
Added documentation and moved types to top
2014-09-11 11:48:44 +02:00
Mathijs van de Nes
ac9301f7d9
Implemented a basic ZipWriter
2014-09-11 10:42:18 +02:00
Mathijs van de Nes
7df03b54f9
Removed some unneeded structs and simplified parse
2014-09-10 17:27:24 +02:00
Mathijs van de Nes
33efdcc539
More elegant way of enforcing single reads
2014-09-10 15:35:01 +02:00