/***********************************************************************1* *2* This software is part of the ast package *3* Copyright (c) 1987-2012 AT&T Intellectual Property *4* and is licensed under the *5* Eclipse Public License, Version 1.0 *6* by AT&T Intellectual Property *7* *8* A copy of the License is available at *9* http://www.eclipse.org/org/documents/epl-v10.html *10* (with md5 checksum b35adb5213ca9657e911e9befb180842) *11* *12* Information and Software Systems Research *13* AT&T Research *14* Florham Park NJ *15* *16* Glenn Fowler <[email protected]> *17* *18***********************************************************************/19#pragma prototyped2021/*22* pax compress format23*/2425#include "format.h"2627static int28compress_getprologue(Pax_t* pax, Format_t* fp, Archive_t* ap, File_t* f, unsigned char* buf, size_t size)29{30if (size < 2 || buf[0] != 0x1f || buf[1] != 0x9d)31return 0;32ap->uncompressed = ap->io->size * 3;33return 1;34}3536static Compress_format_t pax_compress_data =37{380,39{ 0 },40{ "zcat" },41};4243Format_t pax_compress_format =44{45"compress",46"lz",47"Lempel-Ziv compression",480,49COMPRESS|IN|OUT,500,510,520,53PAXNEXT(compress),54&pax_compress_data,550,56compress_getprologue,57};5859PAXLIB(compress)606162