Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
att
GitHub Repository: att/ast
Path: blob/master/src/cmd/pax/pax-vczip.c
1808 views
1
/***********************************************************************
2
* *
3
* This software is part of the ast package *
4
* Copyright (c) 1987-2012 AT&T Intellectual Property *
5
* and is licensed under the *
6
* Eclipse Public License, Version 1.0 *
7
* by AT&T Intellectual Property *
8
* *
9
* A copy of the License is available at *
10
* http://www.eclipse.org/org/documents/epl-v10.html *
11
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
12
* *
13
* Information and Software Systems Research *
14
* AT&T Research *
15
* Florham Park NJ *
16
* *
17
* Glenn Fowler <[email protected]> *
18
* *
19
***********************************************************************/
20
#pragma prototyped
21
22
/*
23
* pax vczip format
24
*/
25
26
#include "format.h"
27
28
static int
29
vczip_getprologue(Pax_t* pax, Format_t* fp, Archive_t* ap, File_t* f, unsigned char* buf, size_t size)
30
{
31
if (size < 4 || buf[0] != 0326 || buf[1] != 0303 || buf[2] != 0304 || buf[3] && buf[3] != 0330)
32
return 0;
33
ap->uncompressed = ap->io->size * 25;
34
return 1;
35
}
36
37
static Compress_format_t pax_vczip_data =
38
{
39
0,
40
{ "vcunzip" },
41
{ 0 },
42
};
43
44
Format_t pax_vczip_format =
45
{
46
"vczip",
47
"vc|vz",
48
"vcodex compression; the details value is the compression \b--method\b=\amethod\a",
49
0,
50
COMPRESS|IN|OUT,
51
0,
52
0,
53
0,
54
PAXNEXT(vczip),
55
&pax_vczip_data,
56
0,
57
vczip_getprologue,
58
0,
59
0,
60
0,
61
0,
62
0,
63
0,
64
0,
65
0,
66
0,
67
0,
68
0
69
};
70
71
PAXLIB(vczip)
72
73