Misplaced Pages

PEAR

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

The PHP Extension and Application Repository , or PEAR , is a repository of PHP software code. Stig S. Bakken founded the PEAR project in 1999 to promote the re-use of code that performs common functions. The project seeks to provide a structured library of code, maintain a system for distributing code and for managing code packages , and promote a standard coding style. Though community-driven, the PEAR project has a PEAR Group which serves as the governing body and takes care of administrative tasks. Each PEAR code package comprises an independent project under the PEAR umbrella. It has its own development team, versioning-control and documentation.

#54945

29-566: A PEAR package is distributed as a gzipped tar file . Each archive consists of source code written in PHP , usually in an object-oriented style . Many PEAR packages can readily be used by developers as ordinary third party code via simple include statements in PHP. More elegantly, the PEAR package manager which comes with PHP by default may be used to install PEAR packages so that the extra functionality provided by

58-513: A free software replacement for the compress program used in early Unix systems, and intended for use by GNU (from which the "g" of gzip is derived). Version 0.1 was first publicly released on 31 October 1992, and version 1.0 followed in February 1993. The decompression of the gzip format can be implemented as a streaming algorithm , an important feature for Web protocols , data interchange and ETL (in standard pipes ) applications. gzip

87-403: A gzip replacement. It produces considerably smaller files (especially for source code and other structured text), but at the cost of memory and processing time (up to a factor of 4). AdvanceCOMP, Zopfli , libdeflate and 7-Zip can produce gzip-compatible files, using an internal DEFLATE implementation with better compression ratios than gzip itself—at the cost of more processor time compared to

116-571: A patent on the algorithm. Spencer Thomas of the University of Utah took this article and implemented compress in 1984, without realizing that a patent was pending on the LZW algorithm. The GIF image format also incorporated LZW compression in this way, and Unisys later claimed royalties on implementations of GIF. Joseph M. Orost led the team and worked with Thomas et al. to create the 'final' (4.0) version of compress and published it as free software to

145-502: A presence on Unix and BSD systems and the compress and uncompress commands have also been ported to the IBM i operating system. The US LZW patent expired in 2003, so it is now in the public domain in the United States. All patents on the LZW worldwide have also expired (see Graphics Interchange Format#Unisys and LZW patent enforcement ). As of POSIX.1-2024 compress supports

174-477: A standardized way to install, uninstall, or upgrade with new PEAR packages or PECL extensions. Before installing a package it can also be instructed to take care of package dependencies so all the extra needed packages are installed too. The PEAR package manager is run from the command line using the pear command. Usually it is therefore only the server administrator who can alter the installed base of PEAR and PECL extensions. On PHP installations running on Linux,

203-564: Is a Unix shell compression program based on the LZW compression algorithm. Compared to gzip 's fastest setting, compress is slightly slower at compression, slightly faster at decompression, and has a significantly lower compression ratio . 1.8 MiB of memory is used to compress the Hutter Prize data, slightly more than gzip's slowest setting. The uncompress utility will restore files to their original state after they have been compressed using

232-448: Is a framework and distribution system for reusable PHP components. It extends PHP and gives a higher level of programming for all web developers. PEAR is divided into three different classes that are: PEAR Core Components, PEAR Packages, and PECL Packages. The PEAR Packages include functionality giving for authentication, networking, and file system features and tools for working with HTML and XML templates. The PEAR package manager provides

261-465: Is actually a bug. LZW does not require any alignment. This bug existed for more than 35 years and was in the original UNIX compress , ncompress , gzip and the Windows port. All application/x-compress files were created using this bug. Some compress implementations write random bits from uninitialized buffer in paddings. There is no guarantee that the paddings will be zeroes. The decompressor must ignore

290-601: Is based on the DEFLATE algorithm, which is a combination of LZ77 and Huffman coding . DEFLATE was intended as a replacement for LZW and other patent -encumbered data compression algorithms which, at the time, limited the usability of the compress utility and other popular archivers. "gzip" is often also used to refer to the gzip file format, which is: Although its file format also allows for multiple such streams to be concatenated (gzipped files are simply decompressed concatenated as if they were originally one file), gzip

319-405: Is compatible with gzip and speeds up compression by using all available CPU cores and threads. Data in blocks prior to the first damaged part of the archive is usually fully readable. Data from blocks not demolished by damage that are located afterward may be recoverable through difficult workarounds. The tar utility included in most Linux distributions can extract .tar.gz files by passing

SECTION 10

#1732849092055

348-448: Is less compact than compressed tarballs holding the same data, because it compresses files individually and cannot take advantage of redundancy between files ( solid compression ). The gzip file format is also not to be confused with that of the compress utility, based on LZW, with extension .Z ; however, the gunzip utility is able to decompress .Z files. Various implementations of the program have been written. The most commonly known

377-512: Is normally used to compress just single files. Compressed archives are typically created by assembling collections of files into a single tar archive (also called tarball ), and then compressing that archive with gzip. The final compressed file usually has the extension .tar.gz or .tgz . gzip is not to be confused with the ZIP archive format, which also uses DEFLATE . The ZIP format can hold collections of files without an external archiver, but

406-438: Is not merely to create an uncompressed copy of the file, but also to restore the timestamp and other attributes of the compressed file. For files produced by compress on other systems, uncompress supports 9- to 16-bit compression. The LZW algorithm used in compress was patented by Sperry Research Center in 1983. Terry Welch published an IEEE article on the algorithm in 1984, but failed to note that he had applied for

435-589: Is the GNU Project's implementation using Lempel-Ziv coding (LZ77). OpenBSD 's version of gzip is actually the compress program, to which support for the gzip format was added in OpenBSD 3.4. The 'g' in this specific version stands for gratis . FreeBSD , DragonFly BSD and NetBSD use a BSD-licensed implementation instead of the GNU version; it is actually a command-line interface for zlib intended to be compatible with

464-522: The z option, e.g., tar -zxf file.tar.gz , where -z instructs decompression, -x means extraction, and -f specifies the name of the compressed archive file to extract from. Optionally, -v ( verbose ) lists files as they are being extracted. zlib is an abstraction of the DEFLATE algorithm in library form which includes support both for the gzip file format and a lightweight data stream format in its API. The zlib stream format, DEFLATE, and

493-443: The DEFLATE algorithm used in gzip . The output binary consists of bit groups. Each bit group consists of codes with fixed amount of bits (9–16). Each group, except the last group, is aligned to the number of bits per code multiplied by 8 and right padded with zeroes. The last group is aligned to 8 bit octets and padded with zeroes. More information can be found at an issue on the ncompress GitHub repository. Example: It

522-585: The compress utility. If no files are specified, the standard input will be uncompressed to the standard output. Files compressed by compress are typically given the extension ".Z" (modeled after the earlier pack program which used the extension ".z"). Most tar programs will pipe their data through compress when given the command line option " -Z ". (The tar program in its own does not compress; it just stores multiple files within one tape archive.) Files can be returned to their original state using uncompress . The usual action of uncompress

551-590: The 'net.sources' USENET group in 1985. U.S. patent 4,558,302 was granted in 1985, and this is why compress could not be used without paying royalties to Sperry Research, which was eventually merged into Unisys. compress has fallen out of favor in particular user-groups because it makes use of the LZW algorithm, which was covered by a Unisys patent – because of this, gzip and bzip2 increased in popularity on Linux -based operating systems due to their alternative algorithms, along with better file compression. compress has, however, maintained

580-477: The GNU implementations' options. These implementations originally come from NetBSD , and support decompression of bzip2 and the Unix pack format. An alternative compression program achieving 3-8% better compression is Zopfli . It achieves gzip-compatible compression using more exhaustive algorithms, at the expense of compression time required. It does not affect decompression time. pigz , written by Mark Adler,

609-773: The PEAR Package Manager. PECL contains C extensions for compiling into PHP. As C programs, PECL extensions run more efficiently than PEAR packages. PECL includes modules for XML-parsing, access to additional databases, mail-parsing, embedding Perl or Python in PHP scripts and for compiling PHP scripts. PECL spun off from the PEAR Project in October 2003. Originally it was called the PEAR Extension Code Library, but it now operates independently of PEAR. PECL extensions are documented alongside standard extensions within

SECTION 20

#1732849092055

638-425: The PEAR package manager is ready for usage by default, but on Windows the PEAR package manager is only available after running a batch file called go-pear.bat . With Pyrus an attempt was undertaken to redesign and improve PEAR from the ground up for PHP 5.3 or newer. Pyrus can be used to install packages from PEAR channels. The last release is from March 2011 and its development might have been discontinued due to

667-533: The PHP Manual, so there is no special manual for PECL extensions. Also, several extensions began their development cycle in PECL and ended up in core (the distributed PHP source) and in many of these cases the PECL versions become unmaintained. Gzip gzip is a file format and a software application used for file compression and decompression . The program was created by Jean-loup Gailly and Mark Adler as

696-544: The form of headers and trailers. Still, the gzip format is sometimes recommended over zlib because Internet Explorer does not implement the standard correctly and cannot handle the zlib format as specified in RFC 1950. zlib DEFLATE is used internally by the Portable Network Graphics (PNG) format. Since the late 1990s, bzip2 , a file compression utility based on a block-sorting algorithm, has gained some popularity as

725-564: The gzip file format were standardized respectively as RFC 1950, RFC 1951, and RFC 1952. The gzip format is used in HTTP compression , a technique used to speed up the sending of HTML and other content on the World Wide Web . It is one of the three standard formats for HTTP compression as specified in RFC 2616. This RFC also specifies a zlib format (called "DEFLATE"), which is equal to the gzip format except that gzip adds eleven bytes of overhead in

754-809: The package appears as an integrated part of the PHP installation. Unlike the Comprehensive Perl Archive Network (CPAN) archives, which PEAR took as its model , PEAR packages do not have implicit dependencies so that a package's placement in the PEAR package tree does not relate to code dependencies. Rather, PEAR packages must explicitly declare all dependencies on other PEAR packages. The PEAR base classes contain code for simulating object-oriented destructors and consistent error-handling. Packages exist for many basic PHP functions including authentication , caching , database access, encryption , configuration, HTML , web services and XML . PEAR means “PHP Extension and Application Repository.” It

783-409: The popularity of Composer. With Composer there is an alternative available for managing packages for a PHP project. Composer also supports the installation of PEAR packages. Some people of the PHP community argue for replacing PEAR in favor of composer. The PHP Extension Community Library (PECL), (pronounced 'pickle') is conceptually very similar to PEAR, and indeed PECL modules are installed with

812-511: The reference implementation. Research published in 2023 showed that simple lossless compression techniques such as gzip could be combined with a k-nearest-neighbor classifier to create an attractive alternative to deep neural networks for text classification in natural language processing . This approach has been shown to equal and in some cases outperform conventional approaches such as BERT due to low resource requirements, e.g. no requirement for GPU hardware. Compress compress

841-619: The values in the paddings for compatibility. compress was standardized in X/Open CAE Specification in 1994, and further in The Open Group Base Specifications, Issue 6 and 7. Linux Standard Base does not requires compress. compress is often not installed by default in Linux distributions, but can be installed from an additional package. compress is available for FreeBSD, OpenBSD, MINIX, Solaris and AIX. compress

#54945