You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/references/api/bindings/miniz.md
+35-6Lines changed: 35 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,7 +85,7 @@ Applies [INFLATE](https://en.wikipedia.org/wiki/Deflate#Decoder/decompressor) to
85
85
86
86
## ZipFileReader
87
87
88
-
Created by [new_reader](#new_reader). You can use this to get information about the files within a ZIP archive or to extract them (in-memory).
88
+
Created by [new_reader](#new_reader) or [new_reader_memory](#new_reader_memory). You can use this to get information about the files within a ZIP archive or to extract them (in-memory).
89
89
90
90
### extract
91
91
@@ -377,15 +377,43 @@ Creates a new [Inflator](#inflator) object and returns a `userdata` reference to
377
377
378
378
### new_reader
379
379
380
-
Creates a new ZIP file reader for the given `fileSystemPath`. The `flags` passed to `miniz` can control the way that the archive is read.
380
+
Creates a new ZIP file reader for the given `fileSystemPath`. The `flags` passed to `miniz` can control the way that the archive is read. This method will automatically load the ZIP file from disk and attempt to decode it.
381
+
382
+
:::info
383
+
This function is suitable if loading the entire file into memory is acceptable. Use a [deflator](#deflator) for streaming.
384
+
:::
385
+
386
+
Returns `nil` and an error message in case of failure. Otherwise the ZIP [reader](#ZipFileReader) should be ready to use.
Creates a new ZIP file reader for the given `fileContents`. The `flags` passed to `miniz` can control the way that the archive is read. You must handle reading the file from disk yourself, however you see fit.
402
+
403
+
:::info
404
+
This function is suitable if loading the entire file into memory is acceptable. Use a [deflator](#deflator) for streaming.
405
+
:::
406
+
407
+
Returns `nil` and an error message in case of failure. Otherwise the ZIP [reader](#ZipFileReader) should be ready to use.
0 commit comments