Lines Matching defs:data

293      * @param string|FileInfo $fileinfo either the name to us in archive (string) or a FileInfo oject with all meta data, empty to take from original
301 * @param string|FileInfo $fileinfo either the name to use in archive (string) or a FileInfo oject with all meta data, empty to take from original
336 // prepare info, compress and write data to archive
381 // we store no data descriptor
400 * Add a file to the current Zip archive using the given $data as content
402 * @param string|FileInfo $fileinfo either the name to us in archive (string) or a FileInfo oject with all meta data
403 * @param string $data binary content of the file to add
406 public function addData($fileinfo, $data)
416 // prepare info and compress data
417 $size = strlen($data);
418 $crc = crc32($data);
420 $data = gzcompress($data, $this->complevel);
421 $data = substr($data, 2, -4); // strip compression headers
423 $csize = strlen($data);
440 // write data
441 $this->writebytes($data);
443 // we store no data descriptor
464 * After a call to this function no more data can be added to the archive, for
507 * Returns the created in-memory archive data
520 * Save the created in-memory archive data
564 $data = unpack(
569 if ($data['comment_size'] != 0) {
570 $centd['comment'] = fread($this->fh, $data['comment_size']);
574 $centd['entries'] = $data['entries'];
575 $centd['disk_entries'] = $data['disk_entries'];
576 $centd['offset'] = $data['offset'];
577 $centd['disk_start'] = $data['disk_start'];
578 $centd['size'] = $data['size'];
579 $centd['disk'] = $data['disk'];
633 * the right position already. Enhances the given central header with the data found at the local header.
641 $data = unpack(
646 $header['filename'] = fread($this->fh, $data['filename_len']);
647 if ($data['extra_len'] != 0) {
648 $header['extra'] = fread($this->fh, $data['extra_len']);
655 $header['compression'] = $data['compression'];
661 if ($data[$hd] != 0) {
662 $header[$hd] = $data[$hd];
665 $header['flag'] = $data['flag'];
666 $header['mtime'] = $this->makeUnixTime($data['mdate'], $data['mtime']);
704 * Create fileinfo object from header data
786 * @param string $data
790 protected function writebytes($data)
793 $this->memory .= $data;
794 $written = strlen($data);
796 $written = @fwrite($this->fh, $data);
807 * @param string $data
812 protected function writebytesAt($data, $offset) {
814 $this->memory .= substr_replace($this->memory, $data, $offset);
815 $written = strlen($data);
818 $written = @fwrite($this->fh, $data);
828 * Current data pointer position
896 * Returns a local file header for the given data
900 * @param int $crc CRC32 checksum of the uncompressed data
901 * @param int $len length of the uncompressed data
902 * @param int $clen length of the compressed data
944 * Returns a local file header for the given data
947 * @param int $crc CRC32 checksum of the uncompressed data
948 * @param int $len length of the uncompressed data
949 * @param int $clen length of the compressed data
987 * @param int $crc CRC32 checksum of the uncompressed data
988 * @param int $len length of the uncompressed data
989 * @param int $clen length of the compressed data