xref: /PHP-8.2/ext/zip/php_zip.stub.php (revision 148ac364)
1<?php
2
3/** @generate-class-entries */
4
5/**
6 * @return resource|int|false
7 * @deprecated
8 */
9function zip_open(string $filename) {}
10
11/**
12 * @param resource $zip
13 * @deprecated
14 */
15function zip_close($zip): void {}
16
17/**
18 * @param resource $zip
19 * @return resource|false
20 * @deprecated
21 */
22function zip_read($zip) {}
23
24/**
25 * @param resource $zip_dp
26 * @param resource $zip_entry
27 * @deprecated
28 */
29function zip_entry_open($zip_dp, $zip_entry, string $mode = "rb"): bool {}
30
31/**
32 * @param resource $zip_entry
33 * @deprecated
34 */
35function zip_entry_close($zip_entry): bool {}
36
37/**
38 * @param resource $zip_entry
39 * @deprecated
40 */
41function zip_entry_read($zip_entry, int $len = 1024): string|false {}
42
43/**
44 * @param resource $zip_entry
45 * @deprecated
46 */
47function zip_entry_name($zip_entry): string|false {}
48
49/**
50 * @param resource $zip_entry
51 * @deprecated
52 */
53function zip_entry_compressedsize($zip_entry): int|false {}
54
55/**
56 * @param resource $zip_entry
57 * @deprecated
58 */
59function zip_entry_filesize($zip_entry): int|false {}
60
61/**
62 * @param resource $zip_entry
63 * @deprecated
64 */
65function zip_entry_compressionmethod($zip_entry): string|false {}
66
67class ZipArchive implements Countable
68{
69    /**
70     * @var int
71     * @cvalue ZIP_CREATE
72     */
73    public const CREATE = UNKNOWN;
74    /**
75     * @var int
76     * @cvalue ZIP_EXCL
77     */
78    public const EXCL = UNKNOWN;
79    /**
80     * @var int
81     * @cvalue ZIP_CHECKCONS
82     */
83    public const CHECKCONS = UNKNOWN;
84    /**
85     * @var int
86     * @cvalue ZIP_OVERWRITE
87     */
88    public const OVERWRITE = UNKNOWN;
89#ifdef ZIP_RDONLY
90    /**
91     * @var int
92     * @cvalue ZIP_RDONLY
93     */
94    public const RDONLY = UNKNOWN;
95#endif
96
97    /**
98     * @var int
99     * @cvalue ZIP_FL_NOCASE
100     */
101    public const FL_NOCASE = UNKNOWN;
102    /**
103     * @var int
104     * @cvalue ZIP_FL_NODIR
105     */
106    public const FL_NODIR = UNKNOWN;
107    /**
108     * @var int
109     * @cvalue ZIP_FL_COMPRESSED
110     */
111    public const FL_COMPRESSED = UNKNOWN;
112    /**
113     * @var int
114     * @cvalue ZIP_FL_UNCHANGED
115     */
116    public const FL_UNCHANGED = UNKNOWN;
117    /**
118     * @var int
119     * @cvalue ZIP_FL_RECOMPRESS
120     */
121    public const FL_RECOMPRESS = UNKNOWN;
122    /**
123     * @var int
124     * @cvalue ZIP_FL_ENCRYPTED
125     */
126    public const FL_ENCRYPTED = UNKNOWN;
127    /**
128     * @var int
129     * @cvalue ZIP_FL_OVERWRITE
130     */
131    public const FL_OVERWRITE = UNKNOWN;
132    /**
133     * @var int
134     * @cvalue ZIP_FL_LOCAL
135     */
136    public const FL_LOCAL = UNKNOWN;
137    /**
138     * @var int
139     * @cvalue ZIP_FL_CENTRAL
140     */
141    public const FL_CENTRAL = UNKNOWN;
142
143    /* Default filename encoding policy. */
144
145    /**
146     * @var int
147     * @cvalue ZIP_FL_ENC_GUESS
148     */
149    public const FL_ENC_GUESS = UNKNOWN;
150    /**
151     * @var int
152     * @cvalue ZIP_FL_ENC_RAW
153     */
154    public const FL_ENC_RAW = UNKNOWN;
155    /**
156     * @var int
157     * @cvalue ZIP_FL_ENC_STRICT
158     */
159    public const FL_ENC_STRICT = UNKNOWN;
160    /**
161     * @var int
162     * @cvalue ZIP_FL_ENC_UTF_8
163     */
164    public const FL_ENC_UTF_8 = UNKNOWN;
165    /**
166     * @var int
167     * @cvalue ZIP_FL_ENC_CP437
168     */
169    public const FL_ENC_CP437 = UNKNOWN;
170
171    /**
172     * @var int
173     * @cvalue ZIP_CM_DEFAULT
174     */
175    public const CM_DEFAULT = UNKNOWN;
176    /**
177     * @var int
178     * @cvalue ZIP_CM_STORE
179     */
180    public const CM_STORE = UNKNOWN;
181    /**
182     * @var int
183     * @cvalue ZIP_CM_SHRINK
184     */
185    public const CM_SHRINK = UNKNOWN;
186    /**
187     * @var int
188     * @cvalue ZIP_CM_REDUCE_1
189     */
190    public const CM_REDUCE_1 = UNKNOWN;
191    /**
192     * @var int
193     * @cvalue ZIP_CM_REDUCE_2
194     */
195    public const CM_REDUCE_2 = UNKNOWN;
196    /**
197     * @var int
198     * @cvalue ZIP_CM_REDUCE_3
199     */
200    public const CM_REDUCE_3 = UNKNOWN;
201    /**
202     * @var int
203     * @cvalue ZIP_CM_REDUCE_4
204     */
205    public const CM_REDUCE_4 = UNKNOWN;
206    /**
207     * @var int
208     * @cvalue ZIP_CM_IMPLODE
209     */
210    public const CM_IMPLODE = UNKNOWN;
211    /**
212     * @var int
213     * @cvalue ZIP_CM_DEFLATE
214     */
215    public const CM_DEFLATE = UNKNOWN;
216    /**
217     * @var int
218     * @cvalue ZIP_CM_DEFLATE64
219     */
220    public const CM_DEFLATE64 = UNKNOWN;
221    /**
222     * @var int
223     * @cvalue ZIP_CM_PKWARE_IMPLODE
224     */
225    public const CM_PKWARE_IMPLODE = UNKNOWN;
226    /**
227     * @var int
228     * @cvalue ZIP_CM_BZIP2
229     */
230    public const CM_BZIP2 = UNKNOWN;
231    /**
232     * @var int
233     * @cvalue ZIP_CM_LZMA
234     */
235    public const CM_LZMA = UNKNOWN;
236#ifdef ZIP_CM_LZMA2
237    /**
238     * @var int
239     * @cvalue ZIP_CM_LZMA2
240     */
241    public const CM_LZMA2 = UNKNOWN;
242#endif
243
244#ifdef ZIP_CM_ZSTD
245    /**
246     * @var int
247     * @cvalue ZIP_CM_ZSTD
248     */
249    public const CM_ZSTD = UNKNOWN;
250#endif
251#ifdef ZIP_CM_XZ
252    /**
253     * @var int
254     * @cvalue ZIP_CM_XZ
255     */
256    public const CM_XZ = UNKNOWN;
257#endif
258    /**
259     * @var int
260     * @cvalue ZIP_CM_TERSE
261     */
262    public const CM_TERSE = UNKNOWN;
263    /**
264     * @var int
265     * @cvalue ZIP_CM_LZ77
266     */
267    public const CM_LZ77 = UNKNOWN;
268    /**
269     * @var int
270     * @cvalue ZIP_CM_WAVPACK
271     */
272    public const CM_WAVPACK = UNKNOWN;
273    /**
274     * @var int
275     * @cvalue ZIP_CM_PPMD
276     */
277    public const CM_PPMD = UNKNOWN;
278
279    /* Error code */
280
281    /**
282     * N No error
283     * @var int
284     * @cvalue ZIP_ER_OK
285     */
286    public const ER_OK = UNKNOWN;
287    /**
288     * N Multi-disk zip archives not supported
289     * @var int
290     * @cvalue ZIP_ER_MULTIDISK
291     */
292    public const ER_MULTIDISK = UNKNOWN;
293    /**
294     * S Renaming temporary file failed
295     * @var int
296     * @cvalue ZIP_ER_RENAME
297     */
298    public const ER_RENAME = UNKNOWN;
299    /**
300     * S Closing zip archive failed
301     * @var int
302     * @cvalue ZIP_ER_CLOSE
303     */
304    public const ER_CLOSE = UNKNOWN;
305    /**
306     * S Seek error
307     * @var int
308     * @cvalue ZIP_ER_SEEK
309     */
310    public const ER_SEEK = UNKNOWN;
311    /**
312     * S Read error
313     * @var int
314     * @cvalue ZIP_ER_READ
315     */
316    public const ER_READ = UNKNOWN;
317    /**
318     * S Write error
319     * @var int
320     * @cvalue ZIP_ER_WRITE
321     */
322    public const ER_WRITE = UNKNOWN;
323    /**
324     * N CRC error
325     * @var int
326     * @cvalue ZIP_ER_CRC
327     */
328    public const ER_CRC = UNKNOWN;
329    /**
330     * N Containing zip archive was closed
331     * @var int
332     * @cvalue ZIP_ER_ZIPCLOSED
333     */
334    public const ER_ZIPCLOSED = UNKNOWN;
335    /**
336     * N No such file
337     * @var int
338     * @cvalue ZIP_ER_NOENT
339     */
340    public const ER_NOENT = UNKNOWN;
341    /**
342     * N File already exists
343     * @var int
344     * @cvalue ZIP_ER_EXISTS
345     */
346    public const ER_EXISTS = UNKNOWN;
347    /**
348     * S Can't open file
349     * @var int
350     * @cvalue ZIP_ER_OPEN
351     */
352    public const ER_OPEN = UNKNOWN;
353    /**
354     * S Failure to create temporary file
355     * @var int
356     * @cvalue ZIP_ER_TMPOPEN
357     */
358    public const ER_TMPOPEN = UNKNOWN;
359    /**
360     * Z Zlib error
361     * @var int
362     * @cvalue ZIP_ER_ZLIB
363     */
364    public const ER_ZLIB = UNKNOWN;
365    /**
366     * N Malloc failure
367     * @var int
368     * @cvalue ZIP_ER_MEMORY
369     */
370    public const ER_MEMORY = UNKNOWN;
371    /**
372     * N Entry has been changed
373     * @var int
374     * @cvalue ZIP_ER_CHANGED
375     */
376    public const ER_CHANGED = UNKNOWN;
377    /**
378     * N Compression method not supported
379     * @var int
380     * @cvalue ZIP_ER_COMPNOTSUPP
381     */
382    public const ER_COMPNOTSUPP = UNKNOWN;
383    /**
384     * N Premature EOF
385     * @var int
386     * @cvalue ZIP_ER_EOF
387     */
388    public const ER_EOF = UNKNOWN;
389    /**
390     * N Invalid argument
391     * @var int
392     * @cvalue ZIP_ER_INVAL
393     */
394    public const ER_INVAL = UNKNOWN;
395    /**
396     * N Not a zip archive
397     * @var int
398     * @cvalue ZIP_ER_NOZIP
399     */
400    public const ER_NOZIP = UNKNOWN;
401    /**
402     * N Internal error
403     * @var int
404     * @cvalue ZIP_ER_INTERNAL
405     */
406    public const ER_INTERNAL = UNKNOWN;
407    /**
408     * N Zip archive inconsistent
409     * @var int
410     * @cvalue ZIP_ER_INCONS
411     */
412    public const ER_INCONS = UNKNOWN;
413    /**
414     * S Can't remove file
415     * @var int
416     * @cvalue ZIP_ER_REMOVE
417     */
418    public const ER_REMOVE = UNKNOWN;
419    /**
420     * N Entry has been deleted
421     * @var int
422     * @cvalue ZIP_ER_DELETED
423     */
424    public const ER_DELETED = UNKNOWN;
425    /**
426     * N Encryption method not supported
427     * @var int
428     * @cvalue ZIP_ER_ENCRNOTSUPP
429     */
430    public const ER_ENCRNOTSUPP = UNKNOWN;
431    /**
432     * N Read-only archive
433     * @var int
434     * @cvalue ZIP_ER_RDONLY
435     */
436    public const ER_RDONLY = UNKNOWN;
437    /**
438     * N Entry has been deleted
439     * @var int
440     * @cvalue ZIP_ER_NOPASSWD
441     */
442    public const ER_NOPASSWD = UNKNOWN;
443    /**
444     * N Wrong password provided
445     * @var int
446     * @cvalue ZIP_ER_WRONGPASSWD
447     */
448    public const ER_WRONGPASSWD = UNKNOWN;
449
450    /* since 1.0.0 */
451
452#ifdef ZIP_ER_OPNOTSUPP
453    /**
454     * N Operation not supported
455     * @var int
456     * @cvalue ZIP_ER_OPNOTSUPP
457     */
458    public const ER_OPNOTSUPP = UNKNOWN;
459#endif
460#ifdef ZIP_ER_INUSE
461    /**
462     * N Resource still in use
463     * @var int
464     * @cvalue ZIP_ER_INUSE
465     */
466    public const ER_INUSE = UNKNOWN;
467#endif
468#ifdef ZIP_ER_TELL
469    /**
470     * S Tell error
471     * @var int
472     * @cvalue ZIP_ER_TELL
473     */
474    public const ER_TELL = UNKNOWN;
475#endif
476
477    /* since 1.6.0 */
478#ifdef ZIP_ER_COMPRESSED_DATA
479    /**
480     * N Compressed data invalid
481     * @var int
482     * @cvalue ZIP_ER_COMPRESSED_DATA
483     */
484    public const ER_COMPRESSED_DATA = UNKNOWN;
485#endif
486#ifdef ZIP_ER_CANCELLED
487    /**
488     * N Operation cancelled
489     * @var int
490     * @cvalue ZIP_ER_CANCELLED
491     */
492    public const ER_CANCELLED = UNKNOWN;
493#endif
494
495#ifdef ZIP_OPSYS_DEFAULT
496    /**
497     * @var int
498     * @cvalue ZIP_OPSYS_DOS
499     * @link ziparchive.constants.opsys
500     */
501    public const OPSYS_DOS = UNKNOWN;
502    /**
503     * @var int
504     * @cvalue ZIP_OPSYS_AMIGA
505     * @link ziparchive.constants.opsys
506     */
507    public const OPSYS_AMIGA = UNKNOWN;
508    /**
509     * @var int
510     * @cvalue ZIP_OPSYS_OPENVMS
511     * @link ziparchive.constants.opsys
512     */
513    public const OPSYS_OPENVMS = UNKNOWN;
514    /**
515     * @var int
516     * @cvalue ZIP_OPSYS_UNIX
517     * @link ziparchive.constants.opsys
518     */
519    public const OPSYS_UNIX = UNKNOWN;
520    /**
521     * @var int
522     * @cvalue ZIP_OPSYS_VM_CMS
523     * @link ziparchive.constants.opsys
524     */
525    public const OPSYS_VM_CMS = UNKNOWN;
526    /**
527     * @var int
528     * @cvalue ZIP_OPSYS_ATARI_ST
529     * @link ziparchive.constants.opsys
530     */
531    public const OPSYS_ATARI_ST = UNKNOWN;
532    /**
533     * @var int
534     * @cvalue ZIP_OPSYS_OS_2
535     * @link ziparchive.constants.opsys
536     */
537    public const OPSYS_OS_2 = UNKNOWN;
538    /**
539     * @var int
540     * @cvalue ZIP_OPSYS_MACINTOSH
541     * @link ziparchive.constants.opsys
542     */
543    public const OPSYS_MACINTOSH = UNKNOWN;
544    /**
545     * @var int
546     * @cvalue ZIP_OPSYS_Z_SYSTEM
547     * @link ziparchive.constants.opsys
548     */
549    public const OPSYS_Z_SYSTEM = UNKNOWN;
550    /**
551     * @var int
552     * @cvalue ZIP_OPSYS_CPM
553     * @link ziparchive.constants.opsys
554     */
555    public const OPSYS_CPM = UNKNOWN;
556    /**
557     * @var int
558     * @cvalue ZIP_OPSYS_WINDOWS_NTFS
559     * @link ziparchive.constants.opsys
560     */
561    public const OPSYS_WINDOWS_NTFS = UNKNOWN;
562    /**
563     * @var int
564     * @cvalue ZIP_OPSYS_MVS
565     * @link ziparchive.constants.opsys
566     */
567    public const OPSYS_MVS = UNKNOWN;
568    /**
569     * @var int
570     * @cvalue ZIP_OPSYS_VSE
571     * @link ziparchive.constants.opsys
572     */
573    public const OPSYS_VSE = UNKNOWN;
574    /**
575     * @var int
576     * @cvalue ZIP_OPSYS_ACORN_RISC
577     * @link ziparchive.constants.opsys
578     */
579    public const OPSYS_ACORN_RISC = UNKNOWN;
580    /**
581     * @var int
582     * @cvalue ZIP_OPSYS_VFAT
583     * @link ziparchive.constants.opsys
584     */
585    public const OPSYS_VFAT = UNKNOWN;
586    /**
587     * @var int
588     * @cvalue ZIP_OPSYS_ALTERNATE_MVS
589     * @link ziparchive.constants.opsys
590     */
591    public const OPSYS_ALTERNATE_MVS = UNKNOWN;
592    /**
593     * @var int
594     * @cvalue ZIP_OPSYS_BEOS
595     * @link ziparchive.constants.opsys
596     */
597    public const OPSYS_BEOS = UNKNOWN;
598    /**
599     * @var int
600     * @cvalue ZIP_OPSYS_TANDEM
601     * @link ziparchive.constants.opsys
602     */
603    public const OPSYS_TANDEM = UNKNOWN;
604    /**
605     * @var int
606     * @cvalue ZIP_OPSYS_OS_400
607     * @link ziparchive.constants.opsys
608     */
609    public const OPSYS_OS_400 = UNKNOWN;
610    /**
611     * @var int
612     * @cvalue ZIP_OPSYS_OS_X
613     * @link ziparchive.constants.opsys
614     */
615    public const OPSYS_OS_X = UNKNOWN;
616    /**
617     * @var int
618     * @cvalue ZIP_OPSYS_DEFAULT
619     * @link ziparchive.constants.opsys
620     */
621    public const OPSYS_DEFAULT = UNKNOWN;
622#endif
623
624    /**
625     * @var int
626     * @cvalue ZIP_EM_NONE
627     */
628    public const EM_NONE = UNKNOWN;
629    /**
630     * @var int
631     * @cvalue ZIP_EM_TRAD_PKWARE
632     */
633    public const EM_TRAD_PKWARE = UNKNOWN;
634#ifdef HAVE_ENCRYPTION
635    /**
636     * @var int
637     * @cvalue ZIP_EM_AES_128
638     */
639    public const EM_AES_128 = UNKNOWN;
640    /**
641     * @var int
642     * @cvalue ZIP_EM_AES_192
643     */
644    public const EM_AES_192 = UNKNOWN;
645    /**
646     * @var int
647     * @cvalue ZIP_EM_AES_256
648     */
649    public const EM_AES_256 = UNKNOWN;
650#endif
651    /**
652     * @var int
653     * @cvalue ZIP_EM_UNKNOWN
654     */
655    public const EM_UNKNOWN = UNKNOWN;
656
657    /**
658     * @var string
659     * @cvalue LIBZIP_VERSION_STR
660     */
661    public const LIBZIP_VERSION = UNKNOWN;
662
663    /** @readonly */
664    public int $lastId;
665    /** @readonly */
666    public int $status;
667    /** @readonly */
668    public int $statusSys;
669    /** @readonly */
670    public int $numFiles;
671    /** @readonly */
672    public string $filename;
673    /** @readonly */
674    public string $comment;
675
676    /** @tentative-return-type */
677    public function open(string $filename, int $flags = 0): bool|int {}
678
679    /**
680     * @tentative-return-type
681     */
682    public function setPassword(#[\SensitiveParameter] string $password): bool {}
683
684    /** @tentative-return-type */
685    public function close(): bool {}
686
687    /** @tentative-return-type */
688    public function count(): int {}
689
690    /** @tentative-return-type */
691    public function getStatusString(): string {}
692
693    public function clearError(): void {}
694
695    /** @tentative-return-type */
696    public function addEmptyDir(string $dirname, int $flags = 0): bool {}
697
698    /** @tentative-return-type */
699    public function addFromString(string $name, string $content, int $flags = ZipArchive::FL_OVERWRITE): bool {}
700
701    /** @tentative-return-type */
702    public function addFile(string $filepath, string $entryname = "", int $start = 0, int $length = 0, int $flags = ZipArchive::FL_OVERWRITE): bool {}
703
704    /** @tentative-return-type */
705    public function replaceFile(string $filepath, int $index, int $start = 0, int $length = 0, int $flags = 0): bool {}
706
707    /** @tentative-return-type */
708    public function addGlob(string $pattern, int $flags = 0, array $options = []): array|false {}
709
710    /** @tentative-return-type */
711    public function addPattern(string $pattern, string $path = ".", array $options = []): array|false {}
712
713    /** @tentative-return-type */
714    public function renameIndex(int $index, string $new_name): bool {}
715
716    /** @tentative-return-type */
717    public function renameName(string $name, string $new_name): bool {}
718
719    /** @tentative-return-type */
720    public function setArchiveComment(string $comment): bool {}
721
722    /** @tentative-return-type */
723    public function getArchiveComment(int $flags = 0): string|false {}
724
725    /** @tentative-return-type */
726    public function setCommentIndex(int $index, string $comment): bool {}
727
728    /** @tentative-return-type */
729    public function setCommentName(string $name, string $comment): bool {}
730
731#ifdef HAVE_SET_MTIME
732    /** @tentative-return-type */
733    public function setMtimeIndex(int $index, int $timestamp, int $flags = 0): bool {}
734
735    /** @tentative-return-type */
736    public function setMtimeName(string $name, int $timestamp, int $flags = 0): bool {}
737#endif
738
739    /** @tentative-return-type */
740    public function getCommentIndex(int $index, int $flags = 0): string|false {}
741
742    /** @tentative-return-type */
743    public function getCommentName(string $name, int $flags = 0): string|false {}
744
745    /** @tentative-return-type */
746    public function deleteIndex(int $index): bool {}
747
748    /** @tentative-return-type */
749    public function deleteName(string $name): bool {}
750
751    /** @tentative-return-type */
752    public function statName(string $name, int $flags = 0): array|false {}
753
754    /** @tentative-return-type */
755    public function statIndex(int $index, int $flags = 0): array|false {}
756
757    /** @tentative-return-type */
758    public function locateName(string $name, int $flags = 0): int|false {}
759
760    /** @tentative-return-type */
761    public function getNameIndex(int $index, int $flags = 0): string|false {}
762
763    /** @tentative-return-type */
764    public function unchangeArchive(): bool {}
765
766    /** @tentative-return-type */
767    public function unchangeAll(): bool {}
768
769    /** @tentative-return-type */
770    public function unchangeIndex(int $index): bool {}
771
772    /** @tentative-return-type */
773    public function unchangeName(string $name): bool {}
774
775    /** @tentative-return-type */
776    public function extractTo(string $pathto, array|string|null $files = null): bool {}
777
778    /** @tentative-return-type */
779    public function getFromName(string $name, int $len = 0, int $flags = 0): string|false {}
780
781    /** @tentative-return-type */
782    public function getFromIndex(int $index, int $len = 0, int $flags = 0): string|false {}
783
784    /** @return resource|false */
785    public function getStreamIndex(int $index, int $flags = 0) {}
786
787    /** @return resource|false */
788    public function getStreamName(string $name, int $flags = 0) {}
789
790	/** @return resource|false */
791    public function getStream(string $name) {}
792
793#ifdef ZIP_OPSYS_DEFAULT
794    /** @tentative-return-type */
795    public function setExternalAttributesName(string $name, int $opsys, int $attr, int $flags = 0): bool {}
796
797    /** @tentative-return-type */
798    public function setExternalAttributesIndex(int $index, int $opsys, int $attr, int $flags = 0): bool {}
799
800    /**
801     * @param int $opsys
802     * @param int $attr
803     * @tentative-return-type
804     */
805    public function getExternalAttributesName(string $name, &$opsys, &$attr, int $flags = 0): bool {}
806
807    /**
808     * @param int $opsys
809     * @param int $attr
810     * @tentative-return-type
811     */
812    public function getExternalAttributesIndex(int $index, &$opsys, &$attr, int $flags = 0): bool {}
813#endif
814
815    /** @tentative-return-type */
816    public function setCompressionName(string $name, int $method, int $compflags = 0): bool {}
817
818    /** @tentative-return-type */
819    public function setCompressionIndex(int $index, int $method, int $compflags = 0): bool {}
820
821#ifdef HAVE_ENCRYPTION
822    /**
823     * @tentative-return-type
824     */
825    public function setEncryptionName(string $name, int $method, #[\SensitiveParameter] ?string $password = null): bool {}
826
827    /**
828     * @tentative-return-type
829     */
830    public function setEncryptionIndex(int $index, int $method, #[\SensitiveParameter] ?string $password = null): bool {}
831#endif
832
833#ifdef HAVE_PROGRESS_CALLBACK
834    /** @tentative-return-type */
835    public function registerProgressCallback(float $rate, callable $callback): bool {}
836#endif
837
838#ifdef HAVE_CANCEL_CALLBACK
839    /** @tentative-return-type */
840    public function registerCancelCallback(callable $callback): bool {}
841#endif
842
843#ifdef HAVE_METHOD_SUPPORTED
844    public static function isCompressionMethodSupported(int $method, bool $enc = true): bool {}
845
846    public static function isEncryptionMethodSupported(int $method, bool $enc = true): bool {}
847#endif
848}
849