40 $prefix =
'mediawiki.compress.7z://';
42 return substr(
$path, strlen( $prefix ) );
46 if ( $mode[0] ==
'r' ) {
47 $options =
'e -bd -so';
48 } elseif ( $mode[0] ==
'w' ) {
49 $options =
'a -bd -si';
59 $this->stream = popen(
$command, $mode[0] );
60 return ( $this->stream !==
false );
70 return fclose( $this->stream );
74 return fflush( $this->stream );
78 return fread( $this->stream, $count );
82 return fwrite( $this->stream, $data );
86 return ftell( $this->stream );
90 return feof( $this->stream );
94 return fseek( $this->stream, $offset, $whence );
98 stream_wrapper_register(
'mediawiki.compress.7z', SevenZipStream::class );