| 2856 | * A stream that can be used to create a file in a ZIP archive |
| 2857 | */ |
| 2858 | export interface ZipInputFile extends ZipAttributes { |
| 2859 | /** |
| 2860 | * The filename to associate with the data provided to this stream. If you |
| 2861 | * want a file in a subdirectory, use forward slashes as a separator (e.g. |
| 2862 | * `directory/filename.ext`). This will still work on Windows. |
| 2863 | */ |
| 2864 | filename: string; |
| 2865 | |
| 2866 | /** |
| 2867 | * The size of the file in bytes. This attribute may be invalid after |
| 2868 | * the file is added to the ZIP archive; it must be correct only before the |
| 2869 | * stream completes. |
| 2870 | * |
| 2871 | * If you don't want to have to compute this yourself, consider extending the |
| 2872 | * ZipPassThrough class and overriding its process() method, or using one of |
| 2873 | * ZipDeflate or AsyncZipDeflate. |
| 2874 | */ |
| 2875 | size: number; |
| 2876 | |
| 2877 | /** |
| 2878 | * A CRC of the original file contents. This attribute may be invalid after |
| 2879 | * the file is added to the ZIP archive; it must be correct only before the |
| 2880 | * stream completes. |
| 2881 | * |
| 2882 | * If you don't want to have to generate this yourself, consider extending the |
| 2883 | * ZipPassThrough class and overriding its process() method, or using one of |
| 2884 | * ZipDeflate or AsyncZipDeflate. |
| 2885 | */ |
| 2886 | crc: number; |
| 2887 | |
| 2888 | /** |
| 2889 | * The compression format for the data stream. This number is determined by |
| 2890 | * the spec in PKZIP's APPNOTE.txt, section 4.4.5. For example, 0 = no |
| 2891 | * compression, 8 = deflate, 14 = LZMA |
| 2892 | */ |
| 2893 | compression: number; |
| 2894 | |
| 2895 | /** |
| 2896 | * Bits 1 and 2 of the general purpose bit flag, specified in PKZIP's |
| 2897 | * APPNOTE.txt, section 4.4.4. Should be between 0 and 3. This is unlikely |
| 2898 | * to be necessary. |
| 2899 | */ |
| 2900 | flag?: number; |
| 2901 | |
| 2902 | /** |
| 2903 | * The handler to be called when data is added. After passing this stream to |
| 2904 | * the ZIP file object, this handler will always be defined. To call it: |
| 2905 | * |
| 2906 | * `stream.ondata(error, chunk, final)` |
| 2907 | * |
| 2908 | * error = any error that occurred (null if there was no error) |
| 2909 | * |
| 2910 | * chunk = a Uint8Array of the data that was added (null if there was an |
| 2911 | * error) |
| 2912 | * |
| 2913 | * final = boolean, whether this is the final chunk in the stream |
| 2914 | */ |
| 2915 | ondata?: AsyncFlateStreamHandler; |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…