You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@orc.apache.org by om...@apache.org on 2017/07/24 17:49:03 UTC
[01/51] [partial] orc git commit: ORC-204 Update and use CMake
External Project to build C++ compression libraries.
Repository: orc
Updated Branches:
refs/heads/master aa67697cc -> 590245a0b
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/examples/gzlog.c
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/examples/gzlog.c b/c++/libs/zlib-1.2.8/examples/gzlog.c
deleted file mode 100644
index 922f878..0000000
--- a/c++/libs/zlib-1.2.8/examples/gzlog.c
+++ /dev/null
@@ -1,1059 +0,0 @@
-/*
- * gzlog.c
- * Copyright (C) 2004, 2008, 2012 Mark Adler, all rights reserved
- * For conditions of distribution and use, see copyright notice in gzlog.h
- * version 2.2, 14 Aug 2012
- */
-
-/*
- gzlog provides a mechanism for frequently appending short strings to a gzip
- file that is efficient both in execution time and compression ratio. The
- strategy is to write the short strings in an uncompressed form to the end of
- the gzip file, only compressing when the amount of uncompressed data has
- reached a given threshold.
-
- gzlog also provides protection against interruptions in the process due to
- system crashes. The status of the operation is recorded in an extra field
- in the gzip file, and is only updated once the gzip file is brought to a
- valid state. The last data to be appended or compressed is saved in an
- auxiliary file, so that if the operation is interrupted, it can be completed
- the next time an append operation is attempted.
-
- gzlog maintains another auxiliary file with the last 32K of data from the
- compressed portion, which is preloaded for the compression of the subsequent
- data. This minimizes the impact to the compression ratio of appending.
- */
-
-/*
- Operations Concept:
-
- Files (log name "foo"):
- foo.gz -- gzip file with the complete log
- foo.add -- last message to append or last data to compress
- foo.dict -- dictionary of the last 32K of data for next compression
- foo.temp -- temporary dictionary file for compression after this one
- foo.lock -- lock file for reading and writing the other files
- foo.repairs -- log file for log file recovery operations (not compressed)
-
- gzip file structure:
- - fixed-length (no file name) header with extra field (see below)
- - compressed data ending initially with empty stored block
- - uncompressed data filling out originally empty stored block and
- subsequent stored blocks as needed (16K max each)
- - gzip trailer
- - no junk at end (no other gzip streams)
-
- When appending data, the information in the first three items above plus the
- foo.add file are sufficient to recover an interrupted append operation. The
- extra field has the necessary information to restore the start of the last
- stored block and determine where to append the data in the foo.add file, as
- well as the crc and length of the gzip data before the append operation.
-
- The foo.add file is created before the gzip file is marked for append, and
- deleted after the gzip file is marked as complete. So if the append
- operation is interrupted, the data to add will still be there. If due to
- some external force, the foo.add file gets deleted between when the append
- operation was interrupted and when recovery is attempted, the gzip file will
- still be restored, but without the appended data.
-
- When compressing data, the information in the first two items above plus the
- foo.add file are sufficient to recover an interrupted compress operation.
- The extra field has the necessary information to find the end of the
- compressed data, and contains both the crc and length of just the compressed
- data and of the complete set of data including the contents of the foo.add
- file.
-
- Again, the foo.add file is maintained during the compress operation in case
- of an interruption. If in the unlikely event the foo.add file with the data
- to be compressed is missing due to some external force, a gzip file with
- just the previous compressed data will be reconstructed. In this case, all
- of the data that was to be compressed is lost (approximately one megabyte).
- This will not occur if all that happened was an interruption of the compress
- operation.
-
- The third state that is marked is the replacement of the old dictionary with
- the new dictionary after a compress operation. Once compression is
- complete, the gzip file is marked as being in the replace state. This
- completes the gzip file, so an interrupt after being so marked does not
- result in recompression. Then the dictionary file is replaced, and the gzip
- file is marked as completed. This state prevents the possibility of
- restarting compression with the wrong dictionary file.
-
- All three operations are wrapped by a lock/unlock procedure. In order to
- gain exclusive access to the log files, first a foo.lock file must be
- exclusively created. When all operations are complete, the lock is
- released by deleting the foo.lock file. If when attempting to create the
- lock file, it already exists and the modify time of the lock file is more
- than five minutes old (set by the PATIENCE define below), then the old
- lock file is considered stale and deleted, and the exclusive creation of
- the lock file is retried. To assure that there are no false assessments
- of the staleness of the lock file, the operations periodically touch the
- lock file to update the modified date.
-
- Following is the definition of the extra field with all of the information
- required to enable the above append and compress operations and their
- recovery if interrupted. Multi-byte values are stored little endian
- (consistent with the gzip format). File pointers are eight bytes long.
- The crc's and lengths for the gzip trailer are four bytes long. (Note that
- the length at the end of a gzip file is used for error checking only, and
- for large files is actually the length modulo 2^32.) The stored block
- length is two bytes long. The gzip extra field two-byte identification is
- "ap" for append. It is assumed that writing the extra field to the file is
- an "atomic" operation. That is, either all of the extra field is written
- to the file, or none of it is, if the operation is interrupted right at the
- point of updating the extra field. This is a reasonable assumption, since
- the extra field is within the first 52 bytes of the file, which is smaller
- than any expected block size for a mass storage device (usually 512 bytes or
- larger).
-
- Extra field (35 bytes):
- - Pointer to first stored block length -- this points to the two-byte length
- of the first stored block, which is followed by the two-byte, one's
- complement of that length. The stored block length is preceded by the
- three-bit header of the stored block, which is the actual start of the
- stored block in the deflate format. See the bit offset field below.
- - Pointer to the last stored block length. This is the same as above, but
- for the last stored block of the uncompressed data in the gzip file.
- Initially this is the same as the first stored block length pointer.
- When the stored block gets to 16K (see the MAX_STORE define), then a new
- stored block as added, at which point the last stored block length pointer
- is different from the first stored block length pointer. When they are
- different, the first bit of the last stored block header is eight bits, or
- one byte back from the block length.
- - Compressed data crc and length. This is the crc and length of the data
- that is in the compressed portion of the deflate stream. These are used
- only in the event that the foo.add file containing the data to compress is
- lost after a compress operation is interrupted.
- - Total data crc and length. This is the crc and length of all of the data
- stored in the gzip file, compressed and uncompressed. It is used to
- reconstruct the gzip trailer when compressing, as well as when recovering
- interrupted operations.
- - Final stored block length. This is used to quickly find where to append,
- and allows the restoration of the original final stored block state when
- an append operation is interrupted.
- - First stored block start as the number of bits back from the final stored
- block first length byte. This value is in the range of 3..10, and is
- stored as the low three bits of the final byte of the extra field after
- subtracting three (0..7). This allows the last-block bit of the stored
- block header to be updated when a new stored block is added, for the case
- when the first stored block and the last stored block are the same. (When
- they are different, the numbers of bits back is known to be eight.) This
- also allows for new compressed data to be appended to the old compressed
- data in the compress operation, overwriting the previous first stored
- block, or for the compressed data to be terminated and a valid gzip file
- reconstructed on the off chance that a compression operation was
- interrupted and the data to compress in the foo.add file was deleted.
- - The operation in process. This is the next two bits in the last byte (the
- bits under the mask 0x18). The are interpreted as 0: nothing in process,
- 1: append in process, 2: compress in process, 3: replace in process.
- - The top three bits of the last byte in the extra field are reserved and
- are currently set to zero.
-
- Main procedure:
- - Exclusively create the foo.lock file using the O_CREAT and O_EXCL modes of
- the system open() call. If the modify time of an existing lock file is
- more than PATIENCE seconds old, then the lock file is deleted and the
- exclusive create is retried.
- - Load the extra field from the foo.gz file, and see if an operation was in
- progress but not completed. If so, apply the recovery procedure below.
- - Perform the append procedure with the provided data.
- - If the uncompressed data in the foo.gz file is 1MB or more, apply the
- compress procedure.
- - Delete the foo.lock file.
-
- Append procedure:
- - Put what to append in the foo.add file so that the operation can be
- restarted if this procedure is interrupted.
- - Mark the foo.gz extra field with the append operation in progress.
- + Restore the original last-block bit and stored block length of the last
- stored block from the information in the extra field, in case a previous
- append operation was interrupted.
- - Append the provided data to the last stored block, creating new stored
- blocks as needed and updating the stored blocks last-block bits and
- lengths.
- - Update the crc and length with the new data, and write the gzip trailer.
- - Write over the extra field (with a single write operation) with the new
- pointers, lengths, and crc's, and mark the gzip file as not in process.
- Though there is still a foo.add file, it will be ignored since nothing
- is in process. If a foo.add file is leftover from a previously
- completed operation, it is truncated when writing new data to it.
- - Delete the foo.add file.
-
- Compress and replace procedures:
- - Read all of the uncompressed data in the stored blocks in foo.gz and write
- it to foo.add. Also write foo.temp with the last 32K of that data to
- provide a dictionary for the next invocation of this procedure.
- - Rewrite the extra field marking foo.gz with a compression in process.
- * If there is no data provided to compress (due to a missing foo.add file
- when recovering), reconstruct and truncate the foo.gz file to contain
- only the previous compressed data and proceed to the step after the next
- one. Otherwise ...
- - Compress the data with the dictionary in foo.dict, and write to the
- foo.gz file starting at the bit immediately following the last previously
- compressed block. If there is no foo.dict, proceed anyway with the
- compression at slightly reduced efficiency. (For the foo.dict file to be
- missing requires some external failure beyond simply the interruption of
- a compress operation.) During this process, the foo.lock file is
- periodically touched to assure that that file is not considered stale by
- another process before we're done. The deflation is terminated with a
- non-last empty static block (10 bits long), that is then located and
- written over by a last-bit-set empty stored block.
- - Append the crc and length of the data in the gzip file (previously
- calculated during the append operations).
- - Write over the extra field with the updated stored block offsets, bits
- back, crc's, and lengths, and mark foo.gz as in process for a replacement
- of the dictionary.
- @ Delete the foo.add file.
- - Replace foo.dict with foo.temp.
- - Write over the extra field, marking foo.gz as complete.
-
- Recovery procedure:
- - If not a replace recovery, read in the foo.add file, and provide that data
- to the appropriate recovery below. If there is no foo.add file, provide
- a zero data length to the recovery. In that case, the append recovery
- restores the foo.gz to the previous compressed + uncompressed data state.
- For the the compress recovery, a missing foo.add file results in foo.gz
- being restored to the previous compressed-only data state.
- - Append recovery:
- - Pick up append at + step above
- - Compress recovery:
- - Pick up compress at * step above
- - Replace recovery:
- - Pick up compress at @ step above
- - Log the repair with a date stamp in foo.repairs
- */
-
-#include <sys/types.h>
-#include <stdio.h> /* rename, fopen, fprintf, fclose */
-#include <stdlib.h> /* malloc, free */
-#include <string.h> /* strlen, strrchr, strcpy, strncpy, strcmp */
-#include <fcntl.h> /* open */
-#include <unistd.h> /* lseek, read, write, close, unlink, sleep, */
- /* ftruncate, fsync */
-#include <errno.h> /* errno */
-#include <time.h> /* time, ctime */
-#include <sys/stat.h> /* stat */
-#include <sys/time.h> /* utimes */
-#include "zlib.h" /* crc32 */
-
-#include "gzlog.h" /* header for external access */
-
-#define local static
-typedef unsigned int uint;
-typedef unsigned long ulong;
-
-/* Macro for debugging to deterministically force recovery operations */
-#ifdef DEBUG
- #include <setjmp.h> /* longjmp */
- jmp_buf gzlog_jump; /* where to go back to */
- int gzlog_bail = 0; /* which point to bail at (1..8) */
- int gzlog_count = -1; /* number of times through to wait */
-# define BAIL(n) do { if (n == gzlog_bail && gzlog_count-- == 0) \
- longjmp(gzlog_jump, gzlog_bail); } while (0)
-#else
-# define BAIL(n)
-#endif
-
-/* how old the lock file can be in seconds before considering it stale */
-#define PATIENCE 300
-
-/* maximum stored block size in Kbytes -- must be in 1..63 */
-#define MAX_STORE 16
-
-/* number of stored Kbytes to trigger compression (must be >= 32 to allow
- dictionary construction, and <= 204 * MAX_STORE, in order for >> 10 to
- discard the stored block headers contribution of five bytes each) */
-#define TRIGGER 1024
-
-/* size of a deflate dictionary (this cannot be changed) */
-#define DICT 32768U
-
-/* values for the operation (2 bits) */
-#define NO_OP 0
-#define APPEND_OP 1
-#define COMPRESS_OP 2
-#define REPLACE_OP 3
-
-/* macros to extract little-endian integers from an unsigned byte buffer */
-#define PULL2(p) ((p)[0]+((uint)((p)[1])<<8))
-#define PULL4(p) (PULL2(p)+((ulong)PULL2(p+2)<<16))
-#define PULL8(p) (PULL4(p)+((off_t)PULL4(p+4)<<32))
-
-/* macros to store integers into a byte buffer in little-endian order */
-#define PUT2(p,a) do {(p)[0]=a;(p)[1]=(a)>>8;} while(0)
-#define PUT4(p,a) do {PUT2(p,a);PUT2(p+2,a>>16);} while(0)
-#define PUT8(p,a) do {PUT4(p,a);PUT4(p+4,a>>32);} while(0)
-
-/* internal structure for log information */
-#define LOGID "\106\035\172" /* should be three non-zero characters */
-struct log {
- char id[4]; /* contains LOGID to detect inadvertent overwrites */
- int fd; /* file descriptor for .gz file, opened read/write */
- char *path; /* allocated path, e.g. "/var/log/foo" or "foo" */
- char *end; /* end of path, for appending suffices such as ".gz" */
- off_t first; /* offset of first stored block first length byte */
- int back; /* location of first block id in bits back from first */
- uint stored; /* bytes currently in last stored block */
- off_t last; /* offset of last stored block first length byte */
- ulong ccrc; /* crc of compressed data */
- ulong clen; /* length (modulo 2^32) of compressed data */
- ulong tcrc; /* crc of total data */
- ulong tlen; /* length (modulo 2^32) of total data */
- time_t lock; /* last modify time of our lock file */
-};
-
-/* gzip header for gzlog */
-local unsigned char log_gzhead[] = {
- 0x1f, 0x8b, /* magic gzip id */
- 8, /* compression method is deflate */
- 4, /* there is an extra field (no file name) */
- 0, 0, 0, 0, /* no modification time provided */
- 0, 0xff, /* no extra flags, no OS specified */
- 39, 0, 'a', 'p', 35, 0 /* extra field with "ap" subfield */
- /* 35 is EXTRA, 39 is EXTRA + 4 */
-};
-
-#define HEAD sizeof(log_gzhead) /* should be 16 */
-
-/* initial gzip extra field content (52 == HEAD + EXTRA + 1) */
-local unsigned char log_gzext[] = {
- 52, 0, 0, 0, 0, 0, 0, 0, /* offset of first stored block length */
- 52, 0, 0, 0, 0, 0, 0, 0, /* offset of last stored block length */
- 0, 0, 0, 0, 0, 0, 0, 0, /* compressed data crc and length */
- 0, 0, 0, 0, 0, 0, 0, 0, /* total data crc and length */
- 0, 0, /* final stored block data length */
- 5 /* op is NO_OP, last bit 8 bits back */
-};
-
-#define EXTRA sizeof(log_gzext) /* should be 35 */
-
-/* initial gzip data and trailer */
-local unsigned char log_gzbody[] = {
- 1, 0, 0, 0xff, 0xff, /* empty stored block (last) */
- 0, 0, 0, 0, /* crc */
- 0, 0, 0, 0 /* uncompressed length */
-};
-
-#define BODY sizeof(log_gzbody)
-
-/* Exclusively create foo.lock in order to negotiate exclusive access to the
- foo.* files. If the modify time of an existing lock file is greater than
- PATIENCE seconds in the past, then consider the lock file to have been
- abandoned, delete it, and try the exclusive create again. Save the lock
- file modify time for verification of ownership. Return 0 on success, or -1
- on failure, usually due to an access restriction or invalid path. Note that
- if stat() or unlink() fails, it may be due to another process noticing the
- abandoned lock file a smidge sooner and deleting it, so those are not
- flagged as an error. */
-local int log_lock(struct log *log)
-{
- int fd;
- struct stat st;
-
- strcpy(log->end, ".lock");
- while ((fd = open(log->path, O_CREAT | O_EXCL, 0644)) < 0) {
- if (errno != EEXIST)
- return -1;
- if (stat(log->path, &st) == 0 && time(NULL) - st.st_mtime > PATIENCE) {
- unlink(log->path);
- continue;
- }
- sleep(2); /* relinquish the CPU for two seconds while waiting */
- }
- close(fd);
- if (stat(log->path, &st) == 0)
- log->lock = st.st_mtime;
- return 0;
-}
-
-/* Update the modify time of the lock file to now, in order to prevent another
- task from thinking that the lock is stale. Save the lock file modify time
- for verification of ownership. */
-local void log_touch(struct log *log)
-{
- struct stat st;
-
- strcpy(log->end, ".lock");
- utimes(log->path, NULL);
- if (stat(log->path, &st) == 0)
- log->lock = st.st_mtime;
-}
-
-/* Check the log file modify time against what is expected. Return true if
- this is not our lock. If it is our lock, touch it to keep it. */
-local int log_check(struct log *log)
-{
- struct stat st;
-
- strcpy(log->end, ".lock");
- if (stat(log->path, &st) || st.st_mtime != log->lock)
- return 1;
- log_touch(log);
- return 0;
-}
-
-/* Unlock a previously acquired lock, but only if it's ours. */
-local void log_unlock(struct log *log)
-{
- if (log_check(log))
- return;
- strcpy(log->end, ".lock");
- unlink(log->path);
- log->lock = 0;
-}
-
-/* Check the gzip header and read in the extra field, filling in the values in
- the log structure. Return op on success or -1 if the gzip header was not as
- expected. op is the current operation in progress last written to the extra
- field. This assumes that the gzip file has already been opened, with the
- file descriptor log->fd. */
-local int log_head(struct log *log)
-{
- int op;
- unsigned char buf[HEAD + EXTRA];
-
- if (lseek(log->fd, 0, SEEK_SET) < 0 ||
- read(log->fd, buf, HEAD + EXTRA) != HEAD + EXTRA ||
- memcmp(buf, log_gzhead, HEAD)) {
- return -1;
- }
- log->first = PULL8(buf + HEAD);
- log->last = PULL8(buf + HEAD + 8);
- log->ccrc = PULL4(buf + HEAD + 16);
- log->clen = PULL4(buf + HEAD + 20);
- log->tcrc = PULL4(buf + HEAD + 24);
- log->tlen = PULL4(buf + HEAD + 28);
- log->stored = PULL2(buf + HEAD + 32);
- log->back = 3 + (buf[HEAD + 34] & 7);
- op = (buf[HEAD + 34] >> 3) & 3;
- return op;
-}
-
-/* Write over the extra field contents, marking the operation as op. Use fsync
- to assure that the device is written to, and in the requested order. This
- operation, and only this operation, is assumed to be atomic in order to
- assure that the log is recoverable in the event of an interruption at any
- point in the process. Return -1 if the write to foo.gz failed. */
-local int log_mark(struct log *log, int op)
-{
- int ret;
- unsigned char ext[EXTRA];
-
- PUT8(ext, log->first);
- PUT8(ext + 8, log->last);
- PUT4(ext + 16, log->ccrc);
- PUT4(ext + 20, log->clen);
- PUT4(ext + 24, log->tcrc);
- PUT4(ext + 28, log->tlen);
- PUT2(ext + 32, log->stored);
- ext[34] = log->back - 3 + (op << 3);
- fsync(log->fd);
- ret = lseek(log->fd, HEAD, SEEK_SET) < 0 ||
- write(log->fd, ext, EXTRA) != EXTRA ? -1 : 0;
- fsync(log->fd);
- return ret;
-}
-
-/* Rewrite the last block header bits and subsequent zero bits to get to a byte
- boundary, setting the last block bit if last is true, and then write the
- remainder of the stored block header (length and one's complement). Leave
- the file pointer after the end of the last stored block data. Return -1 if
- there is a read or write failure on the foo.gz file */
-local int log_last(struct log *log, int last)
-{
- int back, len, mask;
- unsigned char buf[6];
-
- /* determine the locations of the bytes and bits to modify */
- back = log->last == log->first ? log->back : 8;
- len = back > 8 ? 2 : 1; /* bytes back from log->last */
- mask = 0x80 >> ((back - 1) & 7); /* mask for block last-bit */
-
- /* get the byte to modify (one or two back) into buf[0] -- don't need to
- read the byte if the last-bit is eight bits back, since in that case
- the entire byte will be modified */
- buf[0] = 0;
- if (back != 8 && (lseek(log->fd, log->last - len, SEEK_SET) < 0 ||
- read(log->fd, buf, 1) != 1))
- return -1;
-
- /* change the last-bit of the last stored block as requested -- note
- that all bits above the last-bit are set to zero, per the type bits
- of a stored block being 00 and per the convention that the bits to
- bring the stream to a byte boundary are also zeros */
- buf[1] = 0;
- buf[2 - len] = (*buf & (mask - 1)) + (last ? mask : 0);
-
- /* write the modified stored block header and lengths, move the file
- pointer to after the last stored block data */
- PUT2(buf + 2, log->stored);
- PUT2(buf + 4, log->stored ^ 0xffff);
- return lseek(log->fd, log->last - len, SEEK_SET) < 0 ||
- write(log->fd, buf + 2 - len, len + 4) != len + 4 ||
- lseek(log->fd, log->stored, SEEK_CUR) < 0 ? -1 : 0;
-}
-
-/* Append len bytes from data to the locked and open log file. len may be zero
- if recovering and no .add file was found. In that case, the previous state
- of the foo.gz file is restored. The data is appended uncompressed in
- deflate stored blocks. Return -1 if there was an error reading or writing
- the foo.gz file. */
-local int log_append(struct log *log, unsigned char *data, size_t len)
-{
- uint put;
- off_t end;
- unsigned char buf[8];
-
- /* set the last block last-bit and length, in case recovering an
- interrupted append, then position the file pointer to append to the
- block */
- if (log_last(log, 1))
- return -1;
-
- /* append, adding stored blocks and updating the offset of the last stored
- block as needed, and update the total crc and length */
- while (len) {
- /* append as much as we can to the last block */
- put = (MAX_STORE << 10) - log->stored;
- if (put > len)
- put = (uint)len;
- if (put) {
- if (write(log->fd, data, put) != put)
- return -1;
- BAIL(1);
- log->tcrc = crc32(log->tcrc, data, put);
- log->tlen += put;
- log->stored += put;
- data += put;
- len -= put;
- }
-
- /* if we need to, add a new empty stored block */
- if (len) {
- /* mark current block as not last */
- if (log_last(log, 0))
- return -1;
-
- /* point to new, empty stored block */
- log->last += 4 + log->stored + 1;
- log->stored = 0;
- }
-
- /* mark last block as last, update its length */
- if (log_last(log, 1))
- return -1;
- BAIL(2);
- }
-
- /* write the new crc and length trailer, and truncate just in case (could
- be recovering from partial append with a missing foo.add file) */
- PUT4(buf, log->tcrc);
- PUT4(buf + 4, log->tlen);
- if (write(log->fd, buf, 8) != 8 ||
- (end = lseek(log->fd, 0, SEEK_CUR)) < 0 || ftruncate(log->fd, end))
- return -1;
-
- /* write the extra field, marking the log file as done, delete .add file */
- if (log_mark(log, NO_OP))
- return -1;
- strcpy(log->end, ".add");
- unlink(log->path); /* ignore error, since may not exist */
- return 0;
-}
-
-/* Replace the foo.dict file with the foo.temp file. Also delete the foo.add
- file, since the compress operation may have been interrupted before that was
- done. Returns 1 if memory could not be allocated, or -1 if reading or
- writing foo.gz fails, or if the rename fails for some reason other than
- foo.temp not existing. foo.temp not existing is a permitted error, since
- the replace operation may have been interrupted after the rename is done,
- but before foo.gz is marked as complete. */
-local int log_replace(struct log *log)
-{
- int ret;
- char *dest;
-
- /* delete foo.add file */
- strcpy(log->end, ".add");
- unlink(log->path); /* ignore error, since may not exist */
- BAIL(3);
-
- /* rename foo.name to foo.dict, replacing foo.dict if it exists */
- strcpy(log->end, ".dict");
- dest = malloc(strlen(log->path) + 1);
- if (dest == NULL)
- return -2;
- strcpy(dest, log->path);
- strcpy(log->end, ".temp");
- ret = rename(log->path, dest);
- free(dest);
- if (ret && errno != ENOENT)
- return -1;
- BAIL(4);
-
- /* mark the foo.gz file as done */
- return log_mark(log, NO_OP);
-}
-
-/* Compress the len bytes at data and append the compressed data to the
- foo.gz deflate data immediately after the previous compressed data. This
- overwrites the previous uncompressed data, which was stored in foo.add
- and is the data provided in data[0..len-1]. If this operation is
- interrupted, it picks up at the start of this routine, with the foo.add
- file read in again. If there is no data to compress (len == 0), then we
- simply terminate the foo.gz file after the previously compressed data,
- appending a final empty stored block and the gzip trailer. Return -1 if
- reading or writing the log.gz file failed, or -2 if there was a memory
- allocation failure. */
-local int log_compress(struct log *log, unsigned char *data, size_t len)
-{
- int fd;
- uint got, max;
- ssize_t dict;
- off_t end;
- z_stream strm;
- unsigned char buf[DICT];
-
- /* compress and append compressed data */
- if (len) {
- /* set up for deflate, allocating memory */
- strm.zalloc = Z_NULL;
- strm.zfree = Z_NULL;
- strm.opaque = Z_NULL;
- if (deflateInit2(&strm, Z_DEFAULT_COMPRESSION, Z_DEFLATED, -15, 8,
- Z_DEFAULT_STRATEGY) != Z_OK)
- return -2;
-
- /* read in dictionary (last 32K of data that was compressed) */
- strcpy(log->end, ".dict");
- fd = open(log->path, O_RDONLY, 0);
- if (fd >= 0) {
- dict = read(fd, buf, DICT);
- close(fd);
- if (dict < 0) {
- deflateEnd(&strm);
- return -1;
- }
- if (dict)
- deflateSetDictionary(&strm, buf, (uint)dict);
- }
- log_touch(log);
-
- /* prime deflate with last bits of previous block, position write
- pointer to write those bits and overwrite what follows */
- if (lseek(log->fd, log->first - (log->back > 8 ? 2 : 1),
- SEEK_SET) < 0 ||
- read(log->fd, buf, 1) != 1 || lseek(log->fd, -1, SEEK_CUR) < 0) {
- deflateEnd(&strm);
- return -1;
- }
- deflatePrime(&strm, (8 - log->back) & 7, *buf);
-
- /* compress, finishing with a partial non-last empty static block */
- strm.next_in = data;
- max = (((uint)0 - 1) >> 1) + 1; /* in case int smaller than size_t */
- do {
- strm.avail_in = len > max ? max : (uint)len;
- len -= strm.avail_in;
- do {
- strm.avail_out = DICT;
- strm.next_out = buf;
- deflate(&strm, len ? Z_NO_FLUSH : Z_PARTIAL_FLUSH);
- got = DICT - strm.avail_out;
- if (got && write(log->fd, buf, got) != got) {
- deflateEnd(&strm);
- return -1;
- }
- log_touch(log);
- } while (strm.avail_out == 0);
- } while (len);
- deflateEnd(&strm);
- BAIL(5);
-
- /* find start of empty static block -- scanning backwards the first one
- bit is the second bit of the block, if the last byte is zero, then
- we know the byte before that has a one in the top bit, since an
- empty static block is ten bits long */
- if ((log->first = lseek(log->fd, -1, SEEK_CUR)) < 0 ||
- read(log->fd, buf, 1) != 1)
- return -1;
- log->first++;
- if (*buf) {
- log->back = 1;
- while ((*buf & ((uint)1 << (8 - log->back++))) == 0)
- ; /* guaranteed to terminate, since *buf != 0 */
- }
- else
- log->back = 10;
-
- /* update compressed crc and length */
- log->ccrc = log->tcrc;
- log->clen = log->tlen;
- }
- else {
- /* no data to compress -- fix up existing gzip stream */
- log->tcrc = log->ccrc;
- log->tlen = log->clen;
- }
-
- /* complete and truncate gzip stream */
- log->last = log->first;
- log->stored = 0;
- PUT4(buf, log->tcrc);
- PUT4(buf + 4, log->tlen);
- if (log_last(log, 1) || write(log->fd, buf, 8) != 8 ||
- (end = lseek(log->fd, 0, SEEK_CUR)) < 0 || ftruncate(log->fd, end))
- return -1;
- BAIL(6);
-
- /* mark as being in the replace operation */
- if (log_mark(log, REPLACE_OP))
- return -1;
-
- /* execute the replace operation and mark the file as done */
- return log_replace(log);
-}
-
-/* log a repair record to the .repairs file */
-local void log_log(struct log *log, int op, char *record)
-{
- time_t now;
- FILE *rec;
-
- now = time(NULL);
- strcpy(log->end, ".repairs");
- rec = fopen(log->path, "a");
- if (rec == NULL)
- return;
- fprintf(rec, "%.24s %s recovery: %s\n", ctime(&now), op == APPEND_OP ?
- "append" : (op == COMPRESS_OP ? "compress" : "replace"), record);
- fclose(rec);
- return;
-}
-
-/* Recover the interrupted operation op. First read foo.add for recovering an
- append or compress operation. Return -1 if there was an error reading or
- writing foo.gz or reading an existing foo.add, or -2 if there was a memory
- allocation failure. */
-local int log_recover(struct log *log, int op)
-{
- int fd, ret = 0;
- unsigned char *data = NULL;
- size_t len = 0;
- struct stat st;
-
- /* log recovery */
- log_log(log, op, "start");
-
- /* load foo.add file if expected and present */
- if (op == APPEND_OP || op == COMPRESS_OP) {
- strcpy(log->end, ".add");
- if (stat(log->path, &st) == 0 && st.st_size) {
- len = (size_t)(st.st_size);
- if ((off_t)len != st.st_size ||
- (data = malloc(st.st_size)) == NULL) {
- log_log(log, op, "allocation failure");
- return -2;
- }
- if ((fd = open(log->path, O_RDONLY, 0)) < 0) {
- log_log(log, op, ".add file read failure");
- return -1;
- }
- ret = (size_t)read(fd, data, len) != len;
- close(fd);
- if (ret) {
- log_log(log, op, ".add file read failure");
- return -1;
- }
- log_log(log, op, "loaded .add file");
- }
- else
- log_log(log, op, "missing .add file!");
- }
-
- /* recover the interrupted operation */
- switch (op) {
- case APPEND_OP:
- ret = log_append(log, data, len);
- break;
- case COMPRESS_OP:
- ret = log_compress(log, data, len);
- break;
- case REPLACE_OP:
- ret = log_replace(log);
- }
-
- /* log status */
- log_log(log, op, ret ? "failure" : "complete");
-
- /* clean up */
- if (data != NULL)
- free(data);
- return ret;
-}
-
-/* Close the foo.gz file (if open) and release the lock. */
-local void log_close(struct log *log)
-{
- if (log->fd >= 0)
- close(log->fd);
- log->fd = -1;
- log_unlock(log);
-}
-
-/* Open foo.gz, verify the header, and load the extra field contents, after
- first creating the foo.lock file to gain exclusive access to the foo.*
- files. If foo.gz does not exist or is empty, then write the initial header,
- extra, and body content of an empty foo.gz log file. If there is an error
- creating the lock file due to access restrictions, or an error reading or
- writing the foo.gz file, or if the foo.gz file is not a proper log file for
- this object (e.g. not a gzip file or does not contain the expected extra
- field), then return true. If there is an error, the lock is released.
- Otherwise, the lock is left in place. */
-local int log_open(struct log *log)
-{
- int op;
-
- /* release open file resource if left over -- can occur if lock lost
- between gzlog_open() and gzlog_write() */
- if (log->fd >= 0)
- close(log->fd);
- log->fd = -1;
-
- /* negotiate exclusive access */
- if (log_lock(log) < 0)
- return -1;
-
- /* open the log file, foo.gz */
- strcpy(log->end, ".gz");
- log->fd = open(log->path, O_RDWR | O_CREAT, 0644);
- if (log->fd < 0) {
- log_close(log);
- return -1;
- }
-
- /* if new, initialize foo.gz with an empty log, delete old dictionary */
- if (lseek(log->fd, 0, SEEK_END) == 0) {
- if (write(log->fd, log_gzhead, HEAD) != HEAD ||
- write(log->fd, log_gzext, EXTRA) != EXTRA ||
- write(log->fd, log_gzbody, BODY) != BODY) {
- log_close(log);
- return -1;
- }
- strcpy(log->end, ".dict");
- unlink(log->path);
- }
-
- /* verify log file and load extra field information */
- if ((op = log_head(log)) < 0) {
- log_close(log);
- return -1;
- }
-
- /* check for interrupted process and if so, recover */
- if (op != NO_OP && log_recover(log, op)) {
- log_close(log);
- return -1;
- }
-
- /* touch the lock file to prevent another process from grabbing it */
- log_touch(log);
- return 0;
-}
-
-/* See gzlog.h for the description of the external methods below */
-gzlog *gzlog_open(char *path)
-{
- size_t n;
- struct log *log;
-
- /* check arguments */
- if (path == NULL || *path == 0)
- return NULL;
-
- /* allocate and initialize log structure */
- log = malloc(sizeof(struct log));
- if (log == NULL)
- return NULL;
- strcpy(log->id, LOGID);
- log->fd = -1;
-
- /* save path and end of path for name construction */
- n = strlen(path);
- log->path = malloc(n + 9); /* allow for ".repairs" */
- if (log->path == NULL) {
- free(log);
- return NULL;
- }
- strcpy(log->path, path);
- log->end = log->path + n;
-
- /* gain exclusive access and verify log file -- may perform a
- recovery operation if needed */
- if (log_open(log)) {
- free(log->path);
- free(log);
- return NULL;
- }
-
- /* return pointer to log structure */
- return log;
-}
-
-/* gzlog_compress() return values:
- 0: all good
- -1: file i/o error (usually access issue)
- -2: memory allocation failure
- -3: invalid log pointer argument */
-int gzlog_compress(gzlog *logd)
-{
- int fd, ret;
- uint block;
- size_t len, next;
- unsigned char *data, buf[5];
- struct log *log = logd;
-
- /* check arguments */
- if (log == NULL || strcmp(log->id, LOGID))
- return -3;
-
- /* see if we lost the lock -- if so get it again and reload the extra
- field information (it probably changed), recover last operation if
- necessary */
- if (log_check(log) && log_open(log))
- return -1;
-
- /* create space for uncompressed data */
- len = ((size_t)(log->last - log->first) & ~(((size_t)1 << 10) - 1)) +
- log->stored;
- if ((data = malloc(len)) == NULL)
- return -2;
-
- /* do statement here is just a cheap trick for error handling */
- do {
- /* read in the uncompressed data */
- if (lseek(log->fd, log->first - 1, SEEK_SET) < 0)
- break;
- next = 0;
- while (next < len) {
- if (read(log->fd, buf, 5) != 5)
- break;
- block = PULL2(buf + 1);
- if (next + block > len ||
- read(log->fd, (char *)data + next, block) != block)
- break;
- next += block;
- }
- if (lseek(log->fd, 0, SEEK_CUR) != log->last + 4 + log->stored)
- break;
- log_touch(log);
-
- /* write the uncompressed data to the .add file */
- strcpy(log->end, ".add");
- fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644);
- if (fd < 0)
- break;
- ret = (size_t)write(fd, data, len) != len;
- if (ret | close(fd))
- break;
- log_touch(log);
-
- /* write the dictionary for the next compress to the .temp file */
- strcpy(log->end, ".temp");
- fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644);
- if (fd < 0)
- break;
- next = DICT > len ? len : DICT;
- ret = (size_t)write(fd, (char *)data + len - next, next) != next;
- if (ret | close(fd))
- break;
- log_touch(log);
-
- /* roll back to compressed data, mark the compress in progress */
- log->last = log->first;
- log->stored = 0;
- if (log_mark(log, COMPRESS_OP))
- break;
- BAIL(7);
-
- /* compress and append the data (clears mark) */
- ret = log_compress(log, data, len);
- free(data);
- return ret;
- } while (0);
-
- /* broke out of do above on i/o error */
- free(data);
- return -1;
-}
-
-/* gzlog_write() return values:
- 0: all good
- -1: file i/o error (usually access issue)
- -2: memory allocation failure
- -3: invalid log pointer argument */
-int gzlog_write(gzlog *logd, void *data, size_t len)
-{
- int fd, ret;
- struct log *log = logd;
-
- /* check arguments */
- if (log == NULL || strcmp(log->id, LOGID))
- return -3;
- if (data == NULL || len <= 0)
- return 0;
-
- /* see if we lost the lock -- if so get it again and reload the extra
- field information (it probably changed), recover last operation if
- necessary */
- if (log_check(log) && log_open(log))
- return -1;
-
- /* create and write .add file */
- strcpy(log->end, ".add");
- fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644);
- if (fd < 0)
- return -1;
- ret = (size_t)write(fd, data, len) != len;
- if (ret | close(fd))
- return -1;
- log_touch(log);
-
- /* mark log file with append in progress */
- if (log_mark(log, APPEND_OP))
- return -1;
- BAIL(8);
-
- /* append data (clears mark) */
- if (log_append(log, data, len))
- return -1;
-
- /* check to see if it's time to compress -- if not, then done */
- if (((log->last - log->first) >> 10) + (log->stored >> 10) < TRIGGER)
- return 0;
-
- /* time to compress */
- return gzlog_compress(log);
-}
-
-/* gzlog_close() return values:
- 0: ok
- -3: invalid log pointer argument */
-int gzlog_close(gzlog *logd)
-{
- struct log *log = logd;
-
- /* check arguments */
- if (log == NULL || strcmp(log->id, LOGID))
- return -3;
-
- /* close the log file and release the lock */
- log_close(log);
-
- /* free structure and return */
- if (log->path != NULL)
- free(log->path);
- strcpy(log->id, "bad");
- free(log);
- return 0;
-}
[31/51] [partial] orc git commit: ORC-204 Update and use CMake
External Project to build C++ compression libraries.
Posted by om...@apache.org.
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/snappy-1.1.2/testdata/lcet10.txt
----------------------------------------------------------------------
diff --git a/c++/libs/snappy-1.1.2/testdata/lcet10.txt b/c++/libs/snappy-1.1.2/testdata/lcet10.txt
deleted file mode 100644
index 25dda6b..0000000
--- a/c++/libs/snappy-1.1.2/testdata/lcet10.txt
+++ /dev/null
@@ -1,7519 +0,0 @@
-
-
-The Project Gutenberg Etext of LOC WORKSHOP ON ELECTRONIC TEXTS
-
-
-
-
- WORKSHOP ON ELECTRONIC TEXTS
-
- PROCEEDINGS
-
-
-
- Edited by James Daly
-
-
-
-
-
-
-
- 9-10 June 1992
-
-
- Library of Congress
- Washington, D.C.
-
-
-
- Supported by a Grant from the David and Lucile Packard Foundation
-
-
- *** *** *** ****** *** *** ***
-
-
- TABLE OF CONTENTS
-
-
-Acknowledgements
-
-Introduction
-
-Proceedings
- Welcome
- Prosser Gifford and Carl Fleischhauer
-
- Session I. Content in a New Form: Who Will Use It and What Will They Do?
- James Daly (Moderator)
- Avra Michelson, Overview
- Susan H. Veccia, User Evaluation
- Joanne Freeman, Beyond the Scholar
- Discussion
-
- Session II. Show and Tell
- Jacqueline Hess (Moderator)
- Elli Mylonas, Perseus Project
- Discussion
- Eric M. Calaluca, Patrologia Latina Database
- Carl Fleischhauer and Ricky Erway, American Memory
- Discussion
- Dorothy Twohig, The Papers of George Washington
- Discussion
- Maria L. Lebron, The Online Journal of Current Clinical Trials
- Discussion
- Lynne K. Personius, Cornell mathematics books
- Discussion
-
- Session III. Distribution, Networks, and Networking:
- Options for Dissemination
- Robert G. Zich (Moderator)
- Clifford A. Lynch
- Discussion
- Howard Besser
- Discussion
- Ronald L. Larsen
- Edwin B. Brownrigg
- Discussion
-
- Session IV. Image Capture, Text Capture, Overview of Text and
- Image Storage Formats
- William L. Hooton (Moderator)
- A) Principal Methods for Image Capture of Text:
- direct scanning, use of microform
- Anne R. Kenney
- Pamela Q.J. Andre
- Judith A. Zidar
- Donald J. Waters
- Discussion
- B) Special Problems: bound volumes, conservation,
- reproducing printed halftones
- George Thoma
- Carl Fleischhauer
- Discussion
- C) Image Standards and Implications for Preservation
- Jean Baronas
- Patricia Battin
- Discussion
- D) Text Conversion: OCR vs. rekeying, standards of accuracy
- and use of imperfect texts, service bureaus
- Michael Lesk
- Ricky Erway
- Judith A. Zidar
- Discussion
-
- Session V. Approaches to Preparing Electronic Texts
- Susan Hockey (Moderator)
- Stuart Weibel
- Discussion
- C.M. Sperberg-McQueen
- Discussion
- Eric M. Calaluca
- Discussion
-
- Session VI. Copyright Issues
- Marybeth Peters
-
- Session VII. Conclusion
- Prosser Gifford (Moderator)
- General discussion
-
-Appendix I: Program
-
-Appendix II: Abstracts
-
-Appendix III: Directory of Participants
-
-
- *** *** *** ****** *** *** ***
-
-
- Acknowledgements
-
-I would like to thank Carl Fleischhauer and Prosser Gifford for the
-opportunity to learn about areas of human activity unknown to me a scant
-ten months ago, and the David and Lucile Packard Foundation for
-supporting that opportunity. The help given by others is acknowledged on
-a separate page.
-
- 19 October 1992
-
-
- *** *** *** ****** *** *** ***
-
-
- INTRODUCTION
-
-The Workshop on Electronic Texts (1) drew together representatives of
-various projects and interest groups to compare ideas, beliefs,
-experiences, and, in particular, methods of placing and presenting
-historical textual materials in computerized form. Most attendees gained
-much in insight and outlook from the event. But the assembly did not
-form a new nation, or, to put it another way, the diversity of projects
-and interests was too great to draw the representatives into a cohesive,
-action-oriented body.(2)
-
-Everyone attending the Workshop shared an interest in preserving and
-providing access to historical texts. But within this broad field the
-attendees represented a variety of formal, informal, figurative, and
-literal groups, with many individuals belonging to more than one. These
-groups may be defined roughly according to the following topics or
-activities:
-
-* Imaging
-* Searchable coded texts
-* National and international computer networks
-* CD-ROM production and dissemination
-* Methods and technology for converting older paper materials into
-electronic form
-* Study of the use of digital materials by scholars and others
-
-This summary is arranged thematically and does not follow the actual
-sequence of presentations.
-
-NOTES:
- (1) In this document, the phrase electronic text is used to mean
- any computerized reproduction or version of a document, book,
- article, or manuscript (including images), and not merely a machine-
- readable or machine-searchable text.
-
- (2) The Workshop was held at the Library of Congress on 9-10 June
- 1992, with funding from the David and Lucile Packard Foundation.
- The document that follows represents a summary of the presentations
- made at the Workshop and was compiled by James DALY. This
- introduction was written by DALY and Carl FLEISCHHAUER.
-
-
-PRESERVATION AND IMAGING
-
-Preservation, as that term is used by archivists,(3) was most explicitly
-discussed in the context of imaging. Anne KENNEY and Lynne PERSONIUS
-explained how the concept of a faithful copy and the user-friendliness of
-the traditional book have guided their project at Cornell University.(4)
-Although interested in computerized dissemination, participants in the
-Cornell project are creating digital image sets of older books in the
-public domain as a source for a fresh paper facsimile or, in a future
-phase, microfilm. The books returned to the library shelves are
-high-quality and useful replacements on acid-free paper that should last
-a long time. To date, the Cornell project has placed little or no
-emphasis on creating searchable texts; one would not be surprised to find
-that the project participants view such texts as new editions, and thus
-not as faithful reproductions.
-
-In her talk on preservation, Patricia BATTIN struck an ecumenical and
-flexible note as she endorsed the creation and dissemination of a variety
-of types of digital copies. Do not be too narrow in defining what counts
-as a preservation element, BATTIN counseled; for the present, at least,
-digital copies made with preservation in mind cannot be as narrowly
-standardized as, say, microfilm copies with the same objective. Setting
-standards precipitously can inhibit creativity, but delay can result in
-chaos, she advised.
-
-In part, BATTIN's position reflected the unsettled nature of image-format
-standards, and attendees could hear echoes of this unsettledness in the
-comments of various speakers. For example, Jean BARONAS reviewed the
-status of several formal standards moving through committees of experts;
-and Clifford LYNCH encouraged the use of a new guideline for transmitting
-document images on Internet. Testimony from participants in the National
-Agricultural Library's (NAL) Text Digitization Program and LC's American
-Memory project highlighted some of the challenges to the actual creation
-or interchange of images, including difficulties in converting
-preservation microfilm to digital form. Donald WATERS reported on the
-progress of a master plan for a project at Yale University to convert
-books on microfilm to digital image sets, Project Open Book (POB).
-
-The Workshop offered rather less of an imaging practicum than planned,
-but "how-to" hints emerge at various points, for example, throughout
-KENNEY's presentation and in the discussion of arcana such as
-thresholding and dithering offered by George THOMA and FLEISCHHAUER.
-
-NOTES:
- (3) Although there is a sense in which any reproductions of
- historical materials preserve the human record, specialists in the
- field have developed particular guidelines for the creation of
- acceptable preservation copies.
-
- (4) Titles and affiliations of presenters are given at the
- beginning of their respective talks and in the Directory of
- Participants (Appendix III).
-
-
-THE MACHINE-READABLE TEXT: MARKUP AND USE
-
-The sections of the Workshop that dealt with machine-readable text tended
-to be more concerned with access and use than with preservation, at least
-in the narrow technical sense. Michael SPERBERG-McQUEEN made a forceful
-presentation on the Text Encoding Initiative's (TEI) implementation of
-the Standard Generalized Markup Language (SGML). His ideas were echoed
-by Susan HOCKEY, Elli MYLONAS, and Stuart WEIBEL. While the
-presentations made by the TEI advocates contained no practicum, their
-discussion focused on the value of the finished product, what the
-European Community calls reusability, but what may also be termed
-durability. They argued that marking up--that is, coding--a text in a
-well-conceived way will permit it to be moved from one computer
-environment to another, as well as to be used by various users. Two
-kinds of markup were distinguished: 1) procedural markup, which
-describes the features of a text (e.g., dots on a page), and 2)
-descriptive markup, which describes the structure or elements of a
-document (e.g., chapters, paragraphs, and front matter).
-
-The TEI proponents emphasized the importance of texts to scholarship.
-They explained how heavily coded (and thus analyzed and annotated) texts
-can underlie research, play a role in scholarly communication, and
-facilitate classroom teaching. SPERBERG-McQUEEN reminded listeners that
-a written or printed item (e.g., a particular edition of a book) is
-merely a representation of the abstraction we call a text. To concern
-ourselves with faithfully reproducing a printed instance of the text,
-SPERBERG-McQUEEN argued, is to concern ourselves with the representation
-of a representation ("images as simulacra for the text"). The TEI proponents'
-interest in images tends to focus on corollary materials for use in teaching,
-for example, photographs of the Acropolis to accompany a Greek text.
-
-By the end of the Workshop, SPERBERG-McQUEEN confessed to having been
-converted to a limited extent to the view that electronic images
-constitute a promising alternative to microfilming; indeed, an
-alternative probably superior to microfilming. But he was not convinced
-that electronic images constitute a serious attempt to represent text in
-electronic form. HOCKEY and MYLONAS also conceded that their experience
-at the Pierce Symposium the previous week at Georgetown University and
-the present conference at the Library of Congress had compelled them to
-reevaluate their perspective on the usefulness of text as images.
-Attendees could see that the text and image advocates were in
-constructive tension, so to say.
-
-Three nonTEI presentations described approaches to preparing
-machine-readable text that are less rigorous and thus less expensive. In
-the case of the Papers of George Washington, Dorothy TWOHIG explained
-that the digital version will provide a not-quite-perfect rendering of
-the transcribed text--some 135,000 documents, available for research
-during the decades while the perfect or print version is completed.
-Members of the American Memory team and the staff of NAL's Text
-Digitization Program (see below) also outlined a middle ground concerning
-searchable texts. In the case of American Memory, contractors produce
-texts with about 99-percent accuracy that serve as "browse" or
-"reference" versions of written or printed originals. End users who need
-faithful copies or perfect renditions must refer to accompanying sets of
-digital facsimile images or consult copies of the originals in a nearby
-library or archive. American Memory staff argued that the high cost of
-producing 100-percent accurate copies would prevent LC from offering
-access to large parts of its collections.
-
-
-THE MACHINE-READABLE TEXT: METHODS OF CONVERSION
-
-Although the Workshop did not include a systematic examination of the
-methods for converting texts from paper (or from facsimile images) into
-machine-readable form, nevertheless, various speakers touched upon this
-matter. For example, WEIBEL reported that OCLC has experimented with a
-merging of multiple optical character recognition systems that will
-reduce errors from an unacceptable rate of 5 characters out of every
-l,000 to an unacceptable rate of 2 characters out of every l,000.
-
-Pamela ANDRE presented an overview of NAL's Text Digitization Program and
-Judith ZIDAR discussed the technical details. ZIDAR explained how NAL
-purchased hardware and software capable of performing optical character
-recognition (OCR) and text conversion and used its own staff to convert
-texts. The process, ZIDAR said, required extensive editing and project
-staff found themselves considering alternatives, including rekeying
-and/or creating abstracts or summaries of texts. NAL reckoned costs at
-$7 per page. By way of contrast, Ricky ERWAY explained that American
-Memory had decided from the start to contract out conversion to external
-service bureaus. The criteria used to select these contractors were cost
-and quality of results, as opposed to methods of conversion. ERWAY noted
-that historical documents or books often do not lend themselves to OCR.
-Bound materials represent a special problem. In her experience, quality
-control--inspecting incoming materials, counting errors in samples--posed
-the most time-consuming aspect of contracting out conversion. ERWAY
-reckoned American Memory's costs at $4 per page, but cautioned that fewer
-cost-elements had been included than in NAL's figure.
-
-
-OPTIONS FOR DISSEMINATION
-
-The topic of dissemination proper emerged at various points during the
-Workshop. At the session devoted to national and international computer
-networks, LYNCH, Howard BESSER, Ronald LARSEN, and Edwin BROWNRIGG
-highlighted the virtues of Internet today and of the network that will
-evolve from Internet. Listeners could discern in these narratives a
-vision of an information democracy in which millions of citizens freely
-find and use what they need. LYNCH noted that a lack of standards
-inhibits disseminating multimedia on the network, a topic also discussed
-by BESSER. LARSEN addressed the issues of network scalability and
-modularity and commented upon the difficulty of anticipating the effects
-of growth in orders of magnitude. BROWNRIGG talked about the ability of
-packet radio to provide certain links in a network without the need for
-wiring. However, the presenters also called attention to the
-shortcomings and incongruities of present-day computer networks. For
-example: 1) Network use is growing dramatically, but much network
-traffic consists of personal communication (E-mail). 2) Large bodies of
-information are available, but a user's ability to search across their
-entirety is limited. 3) There are significant resources for science and
-technology, but few network sources provide content in the humanities.
-4) Machine-readable texts are commonplace, but the capability of the
-system to deal with images (let alone other media formats) lags behind.
-A glimpse of a multimedia future for networks, however, was provided by
-Maria LEBRON in her overview of the Online Journal of Current Clinical
-Trials (OJCCT), and the process of scholarly publishing on-line.
-
-The contrasting form of the CD-ROM disk was never systematically
-analyzed, but attendees could glean an impression from several of the
-show-and-tell presentations. The Perseus and American Memory examples
-demonstrated recently published disks, while the descriptions of the
-IBYCUS version of the Papers of George Washington and Chadwyck-Healey's
-Patrologia Latina Database (PLD) told of disks to come. According to
-Eric CALALUCA, PLD's principal focus has been on converting Jacques-Paul
-Migne's definitive collection of Latin texts to machine-readable form.
-Although everyone could share the network advocates' enthusiasm for an
-on-line future, the possibility of rolling up one's sleeves for a session
-with a CD-ROM containing both textual materials and a powerful retrieval
-engine made the disk seem an appealing vessel indeed. The overall
-discussion suggested that the transition from CD-ROM to on-line networked
-access may prove far slower and more difficult than has been anticipated.
-
-
-WHO ARE THE USERS AND WHAT DO THEY DO?
-
-Although concerned with the technicalities of production, the Workshop
-never lost sight of the purposes and uses of electronic versions of
-textual materials. As noted above, those interested in imaging discussed
-the problematical matter of digital preservation, while the TEI proponents
-described how machine-readable texts can be used in research. This latter
-topic received thorough treatment in the paper read by Avra MICHELSON.
-She placed the phenomenon of electronic texts within the context of
-broader trends in information technology and scholarly communication.
-
-Among other things, MICHELSON described on-line conferences that
-represent a vigorous and important intellectual forum for certain
-disciplines. Internet now carries more than 700 conferences, with about
-80 percent of these devoted to topics in the social sciences and the
-humanities. Other scholars use on-line networks for "distance learning."
-Meanwhile, there has been a tremendous growth in end-user computing;
-professors today are less likely than their predecessors to ask the
-campus computer center to process their data. Electronic texts are one
-key to these sophisticated applications, MICHELSON reported, and more and
-more scholars in the humanities now work in an on-line environment.
-Toward the end of the Workshop, Michael LESK presented a corollary to
-MICHELSON's talk, reporting the results of an experiment that compared
-the work of one group of chemistry students using traditional printed
-texts and two groups using electronic sources. The experiment
-demonstrated that in the event one does not know what to read, one needs
-the electronic systems; the electronic systems hold no advantage at the
-moment if one knows what to read, but neither do they impose a penalty.
-
-DALY provided an anecdotal account of the revolutionizing impact of the
-new technology on his previous methods of research in the field of classics.
-His account, by extrapolation, served to illustrate in part the arguments
-made by MICHELSON concerning the positive effects of the sudden and radical
-transformation being wrought in the ways scholars work.
-
-Susan VECCIA and Joanne FREEMAN delineated the use of electronic
-materials outside the university. The most interesting aspect of their
-use, FREEMAN said, could be seen as a paradox: teachers in elementary
-and secondary schools requested access to primary source materials but,
-at the same time, found that "primariness" itself made these materials
-difficult for their students to use.
-
-
-OTHER TOPICS
-
-Marybeth PETERS reviewed copyright law in the United States and offered
-advice during a lively discussion of this subject. But uncertainty
-remains concerning the price of copyright in a digital medium, because a
-solution remains to be worked out concerning management and synthesis of
-copyrighted and out-of-copyright pieces of a database.
-
-As moderator of the final session of the Workshop, Prosser GIFFORD directed
-discussion to future courses of action and the potential role of LC in
-advancing them. Among the recommendations that emerged were the following:
-
- * Workshop participants should 1) begin to think about working
- with image material, but structure and digitize it in such a
- way that at a later stage it can be interpreted into text, and
- 2) find a common way to build text and images together so that
- they can be used jointly at some stage in the future, with
- appropriate network support, because that is how users will want
- to access these materials. The Library might encourage attempts
- to bring together people who are working on texts and images.
-
- * A network version of American Memory should be developed or
- consideration should be given to making the data in it
- available to people interested in doing network multimedia.
- Given the current dearth of digital data that is appealing and
- unencumbered by extremely complex rights problems, developing a
- network version of American Memory could do much to help make
- network multimedia a reality.
-
- * Concerning the thorny issue of electronic deposit, LC should
- initiate a catalytic process in terms of distributed
- responsibility, that is, bring together the distributed
- organizations and set up a study group to look at all the
- issues related to electronic deposit and see where we as a
- nation should move. For example, LC might attempt to persuade
- one major library in each state to deal with its state
- equivalent publisher, which might produce a cooperative project
- that would be equitably distributed around the country, and one
- in which LC would be dealing with a minimal number of publishers
- and minimal copyright problems. LC must also deal with the
- concept of on-line publishing, determining, among other things,
- how serials such as OJCCT might be deposited for copyright.
-
- * Since a number of projects are planning to carry out
- preservation by creating digital images that will end up in
- on-line or near-line storage at some institution, LC might play
- a helpful role, at least in the near term, by accelerating how
- to catalog that information into the Research Library Information
- Network (RLIN) and then into OCLC, so that it would be accessible.
- This would reduce the possibility of multiple institutions digitizing
- the same work.
-
-
-CONCLUSION
-
-The Workshop was valuable because it brought together partisans from
-various groups and provided an occasion to compare goals and methods.
-The more committed partisans frequently communicate with others in their
-groups, but less often across group boundaries. The Workshop was also
-valuable to attendees--including those involved with American Memory--who
-came less committed to particular approaches or concepts. These
-attendees learned a great deal, and plan to select and employ elements of
-imaging, text-coding, and networked distribution that suit their
-respective projects and purposes.
-
-Still, reality rears its ugly head: no breakthrough has been achieved.
-On the imaging side, one confronts a proliferation of competing
-data-interchange standards and a lack of consensus on the role of digital
-facsimiles in preservation. In the realm of machine-readable texts, one
-encounters a reasonably mature standard but methodological difficulties
-and high costs. These latter problems, of course, represent a special
-impediment to the desire, as it is sometimes expressed in the popular
-press, "to put the [contents of the] Library of Congress on line." In
-the words of one participant, there was "no solution to the economic
-problems--the projects that are out there are surviving, but it is going
-to be a lot of work to transform the information industry, and so far the
-investment to do that is not forthcoming" (LESK, per litteras).
-
-
- *** *** *** ****** *** *** ***
-
-
- PROCEEDINGS
-
-
-WELCOME
-
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-GIFFORD * Origin of Workshop in current Librarian's desire to make LC's
-collections more widely available * Desiderata arising from the prospect
-of greater interconnectedness *
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-After welcoming participants on behalf of the Library of Congress,
-American Memory (AM), and the National Demonstration Lab, Prosser
-GIFFORD, director for scholarly programs, Library of Congress, located
-the origin of the Workshop on Electronic Texts in a conversation he had
-had considerably more than a year ago with Carl FLEISCHHAUER concerning
-some of the issues faced by AM. On the assumption that numerous other
-people were asking the same questions, the decision was made to bring
-together as many of these people as possible to ask the same questions
-together. In a deeper sense, GIFFORD said, the origin of the Workshop
-lay in the desire of the current Librarian of Congress, James H.
-Billington, to make the collections of the Library, especially those
-offering unique or unusual testimony on aspects of the American
-experience, available to a much wider circle of users than those few
-people who can come to Washington to use them. This meant that the
-emphasis of AM, from the outset, has been on archival collections of the
-basic material, and on making these collections themselves available,
-rather than selected or heavily edited products.
-
-From AM's emphasis followed the questions with which the Workshop began:
-who will use these materials, and in what form will they wish to use
-them. But an even larger issue deserving mention, in GIFFORD's view, was
-the phenomenal growth in Internet connectivity. He expressed the hope
-that the prospect of greater interconnectedness than ever before would
-lead to: 1) much more cooperative and mutually supportive endeavors; 2)
-development of systems of shared and distributed responsibilities to
-avoid duplication and to ensure accuracy and preservation of unique
-materials; and 3) agreement on the necessary standards and development of
-the appropriate directories and indices to make navigation
-straightforward among the varied resources that are, and increasingly
-will be, available. In this connection, GIFFORD requested that
-participants reflect from the outset upon the sorts of outcomes they
-thought the Workshop might have. Did those present constitute a group
-with sufficient common interests to propose a next step or next steps,
-and if so, what might those be? They would return to these questions the
-following afternoon.
-
- ******
-
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-FLEISCHHAUER * Core of Workshop concerns preparation and production of
-materials * Special challenge in conversion of textual materials *
-Quality versus quantity * Do the several groups represented share common
-interests? *
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-Carl FLEISCHHAUER, coordinator, American Memory, Library of Congress,
-emphasized that he would attempt to represent the people who perform some
-of the work of converting or preparing materials and that the core of
-the Workshop had to do with preparation and production. FLEISCHHAUER
-then drew a distinction between the long term, when many things would be
-available and connected in the ways that GIFFORD described, and the short
-term, in which AM not only has wrestled with the issue of what is the
-best course to pursue but also has faced a variety of technical
-challenges.
-
-FLEISCHHAUER remarked AM's endeavors to deal with a wide range of library
-formats, such as motion picture collections, sound-recording collections,
-and pictorial collections of various sorts, especially collections of
-photographs. In the course of these efforts, AM kept coming back to
-textual materials--manuscripts or rare printed matter, bound materials,
-etc. Text posed the greatest conversion challenge of all. Thus, the
-genesis of the Workshop, which reflects the problems faced by AM. These
-problems include physical problems. For example, those in the library
-and archive business deal with collections made up of fragile and rare
-manuscript items, bound materials, especially the notoriously brittle
-bound materials of the late nineteenth century. These are precious
-cultural artifacts, however, as well as interesting sources of
-information, and LC desires to retain and conserve them. AM needs to
-handle things without damaging them. Guillotining a book to run it
-through a sheet feeder must be avoided at all costs.
-
-Beyond physical problems, issues pertaining to quality arose. For
-example, the desire to provide users with a searchable text is affected
-by the question of acceptable level of accuracy. One hundred percent
-accuracy is tremendously expensive. On the other hand, the output of
-optical character recognition (OCR) can be tremendously inaccurate.
-Although AM has attempted to find a middle ground, uncertainty persists
-as to whether or not it has discovered the right solution.
-
-Questions of quality arose concerning images as well. FLEISCHHAUER
-contrasted the extremely high level of quality of the digital images in
-the Cornell Xerox Project with AM's efforts to provide a browse-quality
-or access-quality image, as opposed to an archival or preservation image.
-FLEISCHHAUER therefore welcomed the opportunity to compare notes.
-
-FLEISCHHAUER observed in passing that conversations he had had about
-networks have begun to signal that for various forms of media a
-determination may be made that there is a browse-quality item, or a
-distribution-and-access-quality item that may coexist in some systems
-with a higher quality archival item that would be inconvenient to send
-through the network because of its size. FLEISCHHAUER referred, of
-course, to images more than to searchable text.
-
-As AM considered those questions, several conceptual issues arose: ought
-AM occasionally to reproduce materials entirely through an image set, at
-other times, entirely through a text set, and in some cases, a mix?
-There probably would be times when the historical authenticity of an
-artifact would require that its image be used. An image might be
-desirable as a recourse for users if one could not provide 100-percent
-accurate text. Again, AM wondered, as a practical matter, if a
-distinction could be drawn between rare printed matter that might exist
-in multiple collections--that is, in ten or fifteen libraries. In such
-cases, the need for perfect reproduction would be less than for unique
-items. Implicit in his remarks, FLEISCHHAUER conceded, was the admission
-that AM has been tilting strongly towards quantity and drawing back a
-little from perfect quality. That is, it seemed to AM that society would
-be better served if more things were distributed by LC--even if they were
-not quite perfect--than if fewer things, perfectly represented, were
-distributed. This was stated as a proposition to be tested, with
-responses to be gathered from users.
-
-In thinking about issues related to reproduction of materials and seeing
-other people engaged in parallel activities, AM deemed it useful to
-convene a conference. Hence, the Workshop. FLEISCHHAUER thereupon
-surveyed the several groups represented: 1) the world of images (image
-users and image makers); 2) the world of text and scholarship and, within
-this group, those concerned with language--FLEISCHHAUER confessed to finding
-delightful irony in the fact that some of the most advanced thinkers on
-computerized texts are those dealing with ancient Greek and Roman materials;
-3) the network world; and 4) the general world of library science, which
-includes people interested in preservation and cataloging.
-
-FLEISCHHAUER concluded his remarks with special thanks to the David and
-Lucile Packard Foundation for its support of the meeting, the American
-Memory group, the Office for Scholarly Programs, the National
-Demonstration Lab, and the Office of Special Events. He expressed the
-hope that David Woodley Packard might be able to attend, noting that
-Packard's work and the work of the foundation had sponsored a number of
-projects in the text area.
-
- ******
-
-SESSION I. CONTENT IN A NEW FORM: WHO WILL USE IT AND WHAT WILL THEY DO?
-
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-DALY * Acknowledgements * A new Latin authors disk * Effects of the new
-technology on previous methods of research *
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-Serving as moderator, James DALY acknowledged the generosity of all the
-presenters for giving of their time, counsel, and patience in planning
-the Workshop, as well as of members of the American Memory project and
-other Library of Congress staff, and the David and Lucile Packard
-Foundation and its executive director, Colburn S. Wilbur.
-
-DALY then recounted his visit in March to the Center for Electronic Texts
-in the Humanities (CETH) and the Department of Classics at Rutgers
-University, where an old friend, Lowell Edmunds, introduced him to the
-department's IBYCUS scholarly personal computer, and, in particular, the
-new Latin CD-ROM, containing, among other things, almost all classical
-Latin literary texts through A.D. 200. Packard Humanities Institute
-(PHI), Los Altos, California, released this disk late in 1991, with a
-nominal triennial licensing fee.
-
-Playing with the disk for an hour or so at Rutgers brought home to DALY
-at once the revolutionizing impact of the new technology on his previous
-methods of research. Had this disk been available two or three years
-earlier, DALY contended, when he was engaged in preparing a commentary on
-Book 10 of Virgil's Aeneid for Cambridge University Press, he would not
-have required a forty-eight-square-foot table on which to spread the
-numerous, most frequently consulted items, including some ten or twelve
-concordances to key Latin authors, an almost equal number of lexica to
-authors who lacked concordances, and where either lexica or concordances
-were lacking, numerous editions of authors antedating and postdating Virgil.
-
-Nor, when checking each of the average six to seven words contained in
-the Virgilian hexameter for its usage elsewhere in Virgil's works or
-other Latin authors, would DALY have had to maintain the laborious
-mechanical process of flipping through these concordances, lexica, and
-editions each time. Nor would he have had to frequent as often the
-Milton S. Eisenhower Library at the Johns Hopkins University to consult
-the Thesaurus Linguae Latinae. Instead of devoting countless hours, or
-the bulk of his research time, to gathering data concerning Virgil's use
-of words, DALY--now freed by PHI's Latin authors disk from the
-tyrannical, yet in some ways paradoxically happy scholarly drudgery--
-would have been able to devote that same bulk of time to analyzing and
-interpreting Virgilian verbal usage.
-
-Citing Theodore Brunner, Gregory Crane, Elli MYLONAS, and Avra MICHELSON,
-DALY argued that this reversal in his style of work, made possible by the
-new technology, would perhaps have resulted in better, more productive
-research. Indeed, even in the course of his browsing the Latin authors
-disk at Rutgers, its powerful search, retrieval, and highlighting
-capabilities suggested to him several new avenues of research into
-Virgil's use of sound effects. This anecdotal account, DALY maintained,
-may serve to illustrate in part the sudden and radical transformation
-being wrought in the ways scholars work.
-
- ******
-
-++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-MICHELSON * Elements related to scholarship and technology * Electronic
-texts within the context of broader trends within information technology
-and scholarly communication * Evaluation of the prospects for the use of
-electronic texts * Relationship of electronic texts to processes of
-scholarly communication in humanities research * New exchange formats
-created by scholars * Projects initiated to increase scholarly access to
-converted text * Trend toward making electronic resources available
-through research and education networks * Changes taking place in
-scholarly communication among humanities scholars * Network-mediated
-scholarship transforming traditional scholarly practices * Key
-information technology trends affecting the conduct of scholarly
-communication over the next decade * The trend toward end-user computing
-* The trend toward greater connectivity * Effects of these trends * Key
-transformations taking place * Summary of principal arguments *
-++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-Avra MICHELSON, Archival Research and Evaluation Staff, National Archives
-and Records Administration (NARA), argued that establishing who will use
-electronic texts and what they will use them for involves a consideration
-of both information technology and scholarship trends. This
-consideration includes several elements related to scholarship and
-technology: 1) the key trends in information technology that are most
-relevant to scholarship; 2) the key trends in the use of currently
-available technology by scholars in the nonscientific community; and 3)
-the relationship between these two very distinct but interrelated trends.
-The investment in understanding this relationship being made by
-information providers, technologists, and public policy developers, as
-well as by scholars themselves, seems to be pervasive and growing,
-MICHELSON contended. She drew on collaborative work with Jeff Rothenberg
-on the scholarly use of technology.
-
-MICHELSON sought to place the phenomenon of electronic texts within the
-context of broader trends within information technology and scholarly
-communication. She argued that electronic texts are of most use to
-researchers to the extent that the researchers' working context (i.e.,
-their relevant bibliographic sources, collegial feedback, analytic tools,
-notes, drafts, etc.), along with their field's primary and secondary
-sources, also is accessible in electronic form and can be integrated in
-ways that are unique to the on-line environment.
-
-Evaluation of the prospects for the use of electronic texts includes two
-elements: 1) an examination of the ways in which researchers currently
-are using electronic texts along with other electronic resources, and 2)
-an analysis of key information technology trends that are affecting the
-long-term conduct of scholarly communication. MICHELSON limited her
-discussion of the use of electronic texts to the practices of humanists
-and noted that the scientific community was outside the panel's overview.
-
-MICHELSON examined the nature of the current relationship of electronic
-texts in particular, and electronic resources in general, to what she
-maintained were, essentially, five processes of scholarly communication
-in humanities research. Researchers 1) identify sources, 2) communicate
-with their colleagues, 3) interpret and analyze data, 4) disseminate
-their research findings, and 5) prepare curricula to instruct the next
-generation of scholars and students. This examination would produce a
-clearer understanding of the synergy among these five processes that
-fuels the tendency of the use of electronic resources for one process to
-stimulate its use for other processes of scholarly communication.
-
-For the first process of scholarly communication, the identification of
-sources, MICHELSON remarked the opportunity scholars now enjoy to
-supplement traditional word-of-mouth searches for sources among their
-colleagues with new forms of electronic searching. So, for example,
-instead of having to visit the library, researchers are able to explore
-descriptions of holdings in their offices. Furthermore, if their own
-institutions' holdings prove insufficient, scholars can access more than
-200 major American library catalogues over Internet, including the
-universities of California, Michigan, Pennsylvania, and Wisconsin.
-Direct access to the bibliographic databases offers intellectual
-empowerment to scholars by presenting a comprehensive means of browsing
-through libraries from their homes and offices at their convenience.
-
-The second process of communication involves communication among
-scholars. Beyond the most common methods of communication, scholars are
-using E-mail and a variety of new electronic communications formats
-derived from it for further academic interchange. E-mail exchanges are
-growing at an astonishing rate, reportedly 15 percent a month. They
-currently constitute approximately half the traffic on research and
-education networks. Moreover, the global spread of E-mail has been so
-rapid that it is now possible for American scholars to use it to
-communicate with colleagues in close to 140 other countries.
-
-Other new exchange formats created by scholars and operating on Internet
-include more than 700 conferences, with about 80 percent of these devoted
-to topics in the social sciences and humanities. The rate of growth of
-these scholarly electronic conferences also is astonishing. From l990 to
-l991, 200 new conferences were identified on Internet. From October 1991
-to June 1992, an additional 150 conferences in the social sciences and
-humanities were added to this directory of listings. Scholars have
-established conferences in virtually every field, within every different
-discipline. For example, there are currently close to 600 active social
-science and humanities conferences on topics such as art and
-architecture, ethnomusicology, folklore, Japanese culture, medical
-education, and gifted and talented education. The appeal to scholars of
-communicating through these conferences is that, unlike any other medium,
-electronic conferences today provide a forum for global communication
-with peers at the front end of the research process.
-
-Interpretation and analysis of sources constitutes the third process of
-scholarly communication that MICHELSON discussed in terms of texts and
-textual resources. The methods used to analyze sources fall somewhere on
-a continuum from quantitative analysis to qualitative analysis.
-Typically, evidence is culled and evaluated using methods drawn from both
-ends of this continuum. At one end, quantitative analysis involves the
-use of mathematical processes such as a count of frequencies and
-distributions of occurrences or, on a higher level, regression analysis.
-At the other end of the continuum, qualitative analysis typically
-involves nonmathematical processes oriented toward language
-interpretation or the building of theory. Aspects of this work involve
-the processing--either manual or computational--of large and sometimes
-massive amounts of textual sources, although the use of nontextual
-sources as evidence, such as photographs, sound recordings, film footage,
-and artifacts, is significant as well.
-
-Scholars have discovered that many of the methods of interpretation and
-analysis that are related to both quantitative and qualitative methods
-are processes that can be performed by computers. For example, computers
-can count. They can count brush strokes used in a Rembrandt painting or
-perform regression analysis for understanding cause and effect. By means
-of advanced technologies, computers can recognize patterns, analyze text,
-and model concepts. Furthermore, computers can complete these processes
-faster with more sources and with greater precision than scholars who
-must rely on manual interpretation of data. But if scholars are to use
-computers for these processes, source materials must be in a form
-amenable to computer-assisted analysis. For this reason many scholars,
-once they have identified the sources that are key to their research, are
-converting them to machine-readable form. Thus, a representative example
-of the numerous textual conversion projects organized by scholars around
-the world in recent years to support computational text analysis is the
-TLG, the Thesaurus Linguae Graecae. This project is devoted to
-converting the extant ancient texts of classical Greece. (Editor's note:
-according to the TLG Newsletter of May l992, TLG was in use in thirty-two
-different countries. This figure updates MICHELSON's previous count by one.)
-
-The scholars performing these conversions have been asked to recognize
-that the electronic sources they are converting for one use possess value
-for other research purposes as well. As a result, during the past few
-years, humanities scholars have initiated a number of projects to
-increase scholarly access to converted text. So, for example, the Text
-Encoding Initiative (TEI), about which more is said later in the program,
-was established as an effort by scholars to determine standard elements
-and methods for encoding machine-readable text for electronic exchange.
-In a second effort to facilitate the sharing of converted text, scholars
-have created a new institution, the Center for Electronic Texts in the
-Humanities (CETH). The center estimates that there are 8,000 series of
-source texts in the humanities that have been converted to
-machine-readable form worldwide. CETH is undertaking an international
-search for converted text in the humanities, compiling it into an
-electronic library, and preparing bibliographic descriptions of the
-sources for the Research Libraries Information Network's (RLIN)
-machine-readable data file. The library profession has begun to initiate
-large conversion projects as well, such as American Memory.
-
-While scholars have been making converted text available to one another,
-typically on disk or on CD-ROM, the clear trend is toward making these
-resources available through research and education networks. Thus, the
-American and French Research on the Treasury of the French Language
-(ARTFL) and the Dante Project are already available on Internet.
-MICHELSON summarized this section on interpretation and analysis by
-noting that: 1) increasing numbers of humanities scholars in the library
-community are recognizing the importance to the advancement of
-scholarship of retrospective conversion of source materials in the arts
-and humanities; and 2) there is a growing realization that making the
-sources available on research and education networks maximizes their
-usefulness for the analysis performed by humanities scholars.
-
-The fourth process of scholarly communication is dissemination of
-research findings, that is, publication. Scholars are using existing
-research and education networks to engineer a new type of publication:
-scholarly-controlled journals that are electronically produced and
-disseminated. Although such journals are still emerging as a
-communication format, their number has grown, from approximately twelve
-to thirty-six during the past year (July 1991 to June 1992). Most of
-these electronic scholarly journals are devoted to topics in the
-humanities. As with network conferences, scholarly enthusiasm for these
-electronic journals stems from the medium's unique ability to advance
-scholarship in a way that no other medium can do by supporting global
-feedback and interchange, practically in real time, early in the research
-process. Beyond scholarly journals, MICHELSON remarked the delivery of
-commercial full-text products, such as articles in professional journals,
-newsletters, magazines, wire services, and reference sources. These are
-being delivered via on-line local library catalogues, especially through
-CD-ROMs. Furthermore, according to MICHELSON, there is general optimism
-that the copyright and fees issues impeding the delivery of full text on
-existing research and education networks soon will be resolved.
-
-The final process of scholarly communication is curriculum development
-and instruction, and this involves the use of computer information
-technologies in two areas. The first is the development of
-computer-oriented instructional tools, which includes simulations,
-multimedia applications, and computer tools that are used to assist in
-the analysis of sources in the classroom, etc. The Perseus Project, a
-database that provides a multimedia curriculum on classical Greek
-civilization, is a good example of the way in which entire curricula are
-being recast using information technologies. It is anticipated that the
-current difficulty in exchanging electronically computer-based
-instructional software, which in turn makes it difficult for one scholar
-to build upon the work of others, will be resolved before too long.
-Stand-alone curricular applications that involve electronic text will be
-sharable through networks, reinforcing their significance as intellectual
-products as well as instructional tools.
-
-The second aspect of electronic learning involves the use of research and
-education networks for distance education programs. Such programs
-interactively link teachers with students in geographically scattered
-locations and rely on the availability of electronic instructional
-resources. Distance education programs are gaining wide appeal among
-state departments of education because of their demonstrated capacity to
-bring advanced specialized course work and an array of experts to many
-classrooms. A recent report found that at least 32 states operated at
-least one statewide network for education in 1991, with networks under
-development in many of the remaining states.
-
-MICHELSON summarized this section by noting two striking changes taking
-place in scholarly communication among humanities scholars. First is the
-extent to which electronic text in particular, and electronic resources
-in general, are being infused into each of the five processes described
-above. As mentioned earlier, there is a certain synergy at work here.
-The use of electronic resources for one process tends to stimulate its
-use for other processes, because the chief course of movement is toward a
-comprehensive on-line working context for humanities scholars that
-includes on-line availability of key bibliographies, scholarly feedback,
-sources, analytical tools, and publications. MICHELSON noted further
-that the movement toward a comprehensive on-line working context for
-humanities scholars is not new. In fact, it has been underway for more
-than forty years in the humanities, since Father Roberto Busa began
-developing an electronic concordance of the works of Saint Thomas Aquinas
-in 1949. What we are witnessing today, MICHELSON contended, is not the
-beginning of this on-line transition but, for at least some humanities
-scholars, the turning point in the transition from a print to an
-electronic working context. Coinciding with the on-line transition, the
-second striking change is the extent to which research and education
-networks are becoming the new medium of scholarly communication. The
-existing Internet and the pending National Education and Research Network
-(NREN) represent the new meeting ground where scholars are going for
-bibliographic information, scholarly dialogue and feedback, the most
-current publications in their field, and high-level educational
-offerings. Traditional scholarly practices are undergoing tremendous
-transformations as a result of the emergence and growing prominence of
-what is called network-mediated scholarship.
-
-MICHELSON next turned to the second element of the framework she proposed
-at the outset of her talk for evaluating the prospects for electronic
-text, namely the key information technology trends affecting the conduct
-of scholarly communication over the next decade: 1) end-user computing
-and 2) connectivity.
-
-End-user computing means that the person touching the keyboard, or
-performing computations, is the same as the person who initiates or
-consumes the computation. The emergence of personal computers, along
-with a host of other forces, such as ubiquitous computing, advances in
-interface design, and the on-line transition, is prompting the consumers
-of computation to do their own computing, and is thus rendering obsolete
-the traditional distinction between end users and ultimate users.
-
-The trend toward end-user computing is significant to consideration of
-the prospects for electronic texts because it means that researchers are
-becoming more adept at doing their own computations and, thus, more
-competent in the use of electronic media. By avoiding programmer
-intermediaries, computation is becoming central to the researcher's
-thought process. This direct involvement in computing is changing the
-researcher's perspective on the nature of research itself, that is, the
-kinds of questions that can be posed, the analytical methodologies that
-can be used, the types and amount of sources that are appropriate for
-analyses, and the form in which findings are presented. The trend toward
-end-user computing means that, increasingly, electronic media and
-computation are being infused into all processes of humanities
-scholarship, inspiring remarkable transformations in scholarly
-communication.
-
-The trend toward greater connectivity suggests that researchers are using
-computation increasingly in network environments. Connectivity is
-important to scholarship because it erases the distance that separates
-students from teachers and scholars from their colleagues, while allowing
-users to access remote databases, share information in many different
-media, connect to their working context wherever they are, and
-collaborate in all phases of research.
-
-The combination of the trend toward end-user computing and the trend
-toward connectivity suggests that the scholarly use of electronic
-resources, already evident among some researchers, will soon become an
-established feature of scholarship. The effects of these trends, along
-with ongoing changes in scholarly practices, point to a future in which
-humanities researchers will use computation and electronic communication
-to help them formulate ideas, access sources, perform research,
-collaborate with colleagues, seek peer review, publish and disseminate
-results, and engage in many other professional and educational activities.
-
-In summary, MICHELSON emphasized four points: 1) A portion of humanities
-scholars already consider electronic texts the preferred format for
-analysis and dissemination. 2) Scholars are using these electronic
-texts, in conjunction with other electronic resources, in all the
-processes of scholarly communication. 3) The humanities scholars'
-working context is in the process of changing from print technology to
-electronic technology, in many ways mirroring transformations that have
-occurred or are occurring within the scientific community. 4) These
-changes are occurring in conjunction with the development of a new
-communication medium: research and education networks that are
-characterized by their capacity to advance scholarship in a wholly unique
-way.
-
-MICHELSON also reiterated her three principal arguments: l) Electronic
-texts are best understood in terms of the relationship to other
-electronic resources and the growing prominence of network-mediated
-scholarship. 2) The prospects for electronic texts lie in their capacity
-to be integrated into the on-line network of electronic resources that
-comprise the new working context for scholars. 3) Retrospective conversion
-of portions of the scholarly record should be a key strategy as information
-providers respond to changes in scholarly communication practices.
-
- ******
-
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-VECCIA * AM's evaluation project and public users of electronic resources
-* AM and its design * Site selection and evaluating the Macintosh
-implementation of AM * Characteristics of the six public libraries
-selected * Characteristics of AM's users in these libraries * Principal
-ways AM is being used *
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-Susan VECCIA, team leader, and Joanne FREEMAN, associate coordinator,
-American Memory, Library of Congress, gave a joint presentation. First,
-by way of introduction, VECCIA explained her and FREEMAN's roles in
-American Memory (AM). Serving principally as an observer, VECCIA has
-assisted with the evaluation project of AM, placing AM collections in a
-variety of different sites around the country and helping to organize and
-implement that project. FREEMAN has been an associate coordinator of AM
-and has been involved principally with the interpretative materials,
-preparing some of the electronic exhibits and printed historical
-information that accompanies AM and that is requested by users. VECCIA
-and FREEMAN shared anecdotal observations concerning AM with public users
-of electronic resources. Notwithstanding a fairly structured evaluation
-in progress, both VECCIA and FREEMAN chose not to report on specifics in
-terms of numbers, etc., because they felt it was too early in the
-evaluation project to do so.
-
-AM is an electronic archive of primary source materials from the Library
-of Congress, selected collections representing a variety of formats--
-photographs, graphic arts, recorded sound, motion pictures, broadsides,
-and soon, pamphlets and books. In terms of the design of this system,
-the interpretative exhibits have been kept separate from the primary
-resources, with good reason. Accompanying this collection are printed
-documentation and user guides, as well as guides that FREEMAN prepared for
-teachers so that they may begin using the content of the system at once.
-
-VECCIA described the evaluation project before talking about the public
-users of AM, limiting her remarks to public libraries, because FREEMAN
-would talk more specifically about schools from kindergarten to twelfth
-grade (K-12). Having started in spring 1991, the evaluation currently
-involves testing of the Macintosh implementation of AM. Since the
-primary goal of this evaluation is to determine the most appropriate
-audience or audiences for AM, very different sites were selected. This
-makes evaluation difficult because of the varying degrees of technology
-literacy among the sites. AM is situated in forty-four locations, of
-which six are public libraries and sixteen are schools. Represented
-among the schools are elementary, junior high, and high schools.
-District offices also are involved in the evaluation, which will
-conclude in summer 1993.
-
-VECCIA focused the remainder of her talk on the six public libraries, one
-of which doubles as a state library. They represent a range of
-geographic areas and a range of demographic characteristics. For
-example, three are located in urban settings, two in rural settings, and
-one in a suburban setting. A range of technical expertise is to be found
-among these facilities as well. For example, one is an "Apple library of
-the future," while two others are rural one-room libraries--in one, AM
-sits at the front desk next to a tractor manual.
-
-All public libraries have been extremely enthusiastic, supportive, and
-appreciative of the work that AM has been doing. VECCIA characterized
-various users: Most users in public libraries describe themselves as
-general readers; of the students who use AM in the public libraries,
-those in fourth grade and above seem most interested. Public libraries
-in rural sites tend to attract retired people, who have been highly
-receptive to AM. Users tend to fall into two additional categories:
-people interested in the content and historical connotations of these
-primary resources, and those fascinated by the technology. The format
-receiving the most comments has been motion pictures. The adult users in
-public libraries are more comfortable with IBM computers, whereas young
-people seem comfortable with either IBM or Macintosh, although most of
-them seem to come from a Macintosh background. This same tendency is
-found in the schools.
-
-What kinds of things do users do with AM? In a public library there are
-two main goals or ways that AM is being used: as an individual learning
-tool, and as a leisure activity. Adult learning was one area that VECCIA
-would highlight as a possible application for a tool such as AM. She
-described a patron of a rural public library who comes in every day on
-his lunch hour and literally reads AM, methodically going through the
-collection image by image. At the end of his hour he makes an electronic
-bookmark, puts it in his pocket, and returns to work. The next day he
-comes in and resumes where he left off. Interestingly, this man had
-never been in the library before he used AM. In another small, rural
-library, the coordinator reports that AM is a popular activity for some
-of the older, retired people in the community, who ordinarily would not
-use "those things,"--computers. Another example of adult learning in
-public libraries is book groups, one of which, in particular, is using AM
-as part of its reading on industrialization, integration, and urbanization
-in the early 1900s.
-
-One library reports that a family is using AM to help educate their
-children. In another instance, individuals from a local museum came in
-to use AM to prepare an exhibit on toys of the past. These two examples
-emphasize the mission of the public library as a cultural institution,
-reaching out to people who do not have the same resources available to
-those who live in a metropolitan area or have access to a major library.
-One rural library reports that junior high school students in large
-numbers came in one afternoon to use AM for entertainment. A number of
-public libraries reported great interest among postcard collectors in the
-Detroit collection, which was essentially a collection of images used on
-postcards around the turn of the century. Train buffs are similarly
-interested because that was a time of great interest in railroading.
-People, it was found, relate to things that they know of firsthand. For
-example, in both rural public libraries where AM was made available,
-observers reported that the older people with personal remembrances of
-the turn of the century were gravitating to the Detroit collection.
-These examples served to underscore MICHELSON's observation re the
-integration of electronic tools and ideas--that people learn best when
-the material relates to something they know.
-
-VECCIA made the final point that in many cases AM serves as a
-public-relations tool for the public libraries that are testing it. In
-one case, AM is being used as a vehicle to secure additional funding for
-the library. In another case, AM has served as an inspiration to the
-staff of a major local public library in the South to think about ways to
-make its own collection of photographs more accessible to the public.
-
- ******
-
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-FREEMAN * AM and archival electronic resources in a school environment *
-Questions concerning context * Questions concerning the electronic format
-itself * Computer anxiety * Access and availability of the system *
-Hardware * Strengths gained through the use of archival resources in
-schools *
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-Reiterating an observation made by VECCIA, that AM is an archival
-resource made up of primary materials with very little interpretation,
-FREEMAN stated that the project has attempted to bridge the gap between
-these bare primary materials and a school environment, and in that cause
-has created guided introductions to AM collections. Loud demand from the
-educational community, chiefly from teachers working with the upper
-grades of elementary school through high school, greeted the announcement
-that AM would be tested around the country.
-
-FREEMAN reported not only on what was learned about AM in a school
-environment, but also on several universal questions that were raised
-concerning archival electronic resources in schools. She discussed
-several strengths of this type of material in a school environment as
-opposed to a highly structured resource that offers a limited number of
-paths to follow.
-
-FREEMAN first raised several questions about using AM in a school
-environment. There is often some difficulty in developing a sense of
-what the system contains. Many students sit down at a computer resource
-and assume that, because AM comes from the Library of Congress, all of
-American history is now at their fingertips. As a result of that sort of
-mistaken judgment, some students are known to conclude that AM contains
-nothing of use to them when they look for one or two things and do not
-find them. It is difficult to discover that middle ground where one has
-a sense of what the system contains. Some students grope toward the idea
-of an archive, a new idea to them, since they have not previously
-experienced what it means to have access to a vast body of somewhat
-random information.
-
-Other questions raised by FREEMAN concerned the electronic format itself.
-For instance, in a school environment it is often difficult both for
-teachers and students to gain a sense of what it is they are viewing.
-They understand that it is a visual image, but they do not necessarily
-know that it is a postcard from the turn of the century, a panoramic
-photograph, or even machine-readable text of an eighteenth-century
-broadside, a twentieth-century printed book, or a nineteenth-century
-diary. That distinction is often difficult for people in a school
-environment to grasp. Because of that, it occasionally becomes difficult
-to draw conclusions from what one is viewing.
-
-FREEMAN also noted the obvious fear of the computer, which constitutes a
-difficulty in using an electronic resource. Though students in general
-did not suffer from this anxiety, several older students feared that they
-were computer-illiterate, an assumption that became self-fulfilling when
-they searched for something but failed to find it. FREEMAN said she
-believed that some teachers also fear computer resources, because they
-believe they lack complete control. FREEMAN related the example of
-teachers shooing away students because it was not their time to use the
-system. This was a case in which the situation had to be extremely
-structured so that the teachers would not feel that they had lost their
-grasp on what the system contained.
-
-A final question raised by FREEMAN concerned access and availability of
-the system. She noted the occasional existence of a gap in communication
-between school librarians and teachers. Often AM sits in a school
-library and the librarian is the person responsible for monitoring the
-system. Teachers do not always take into their world new library
-resources about which the librarian is excited. Indeed, at the sites
-where AM had been used most effectively within a library, the librarian
-was required to go to specific teachers and instruct them in its use. As
-a result, several AM sites will have in-service sessions over a summer,
-in the hope that perhaps, with a more individualized link, teachers will
-be more likely to use the resource.
-
-A related issue in the school context concerned the number of
-workstations available at any one location. Centralization of equipment
-at the district level, with teachers invited to download things and walk
-away with them, proved unsuccessful because the hours these offices were
-open were also school hours.
-
-Another issue was hardware. As VECCIA observed, a range of sites exists,
-some technologically advanced and others essentially acquiring their
-first computer for the primary purpose of using it in conjunction with
-AM's testing. Users at technologically sophisticated sites want even
-more sophisticated hardware, so that they can perform even more
-sophisticated tasks with the materials in AM. But once they acquire a
-newer piece of hardware, they must learn how to use that also; at an
-unsophisticated site it takes an extremely long time simply to become
-accustomed to the computer, not to mention the program offered with the
-computer. All of these small issues raise one large question, namely,
-are systems like AM truly rewarding in a school environment, or do they
-simply act as innovative toys that do little more than spark interest?
-
-FREEMAN contended that the evaluation project has revealed several strengths
-that were gained through the use of archival resources in schools, including:
-
- * Psychic rewards from using AM as a vast, rich database, with
- teachers assigning various projects to students--oral presentations,
- written reports, a documentary, a turn-of-the-century newspaper--
- projects that start with the materials in AM but are completed using
- other resources; AM thus is used as a research tool in conjunction
- with other electronic resources, as well as with books and items in
- the library where the system is set up.
-
- * Students are acquiring computer literacy in a humanities context.
-
- * This sort of system is overcoming the isolation between disciplines
- that often exists in schools. For example, many English teachers are
- requiring their students to write papers on historical topics
- represented in AM. Numerous teachers have reported that their
- students are learning critical thinking skills using the system.
-
- * On a broader level, AM is introducing primary materials, not only
- to students but also to teachers, in an environment where often
- simply none exist--an exciting thing for the students because it
- helps them learn to conduct research, to interpret, and to draw
- their own conclusions. In learning to conduct research and what it
- means, students are motivated to seek knowledge. That relates to
- another positive outcome--a high level of personal involvement of
- students with the materials in this system and greater motivation to
- conduct their own research and draw their own conclusions.
-
- * Perhaps the most ironic strength of these kinds of archival
- electronic resources is that many of the teachers AM interviewed
- were desperate, it is no exaggeration to say, not only for primary
- materials but for unstructured primary materials. These would, they
- thought, foster personally motivated research, exploration, and
- excitement in their students. Indeed, these materials have done
- just that. Ironically, however, this lack of structure produces
- some of the confusion to which the newness of these kinds of
- resources may also contribute. The key to effective use of archival
- products in a school environment is a clear, effective introduction
- to the system and to what it contains.
-
- ******
-
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-DISCUSSION * Nothing known, quantitatively, about the number of
-humanities scholars who must see the original versus those who would
-settle for an edited transcript, or about the ways in which humanities
-scholars are using information technology * Firm conclusions concerning
-the manner and extent of the use of supporting materials in print
-provided by AM to await completion of evaluative study * A listener's
-reflections on additional applications of electronic texts * Role of
-electronic resources in teaching elementary research skills to students *
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-During the discussion that followed the presentations by MICHELSON,
-VECCIA, and FREEMAN, additional points emerged.
-
-LESK asked if MICHELSON could give any quantitative estimate of the
-number of humanities scholars who must see or want to see the original,
-or the best possible version of the material, versus those who typically
-would settle for an edited transcript. While unable to provide a figure,
-she offered her impressions as an archivist who has done some reference
-work and has discussed this issue with other archivists who perform
-reference, that those who use archives and those who use primary sources
-for what would be considered very high-level scholarly research, as
-opposed to, say, undergraduate papers, were few in number, especially
-given the public interest in using primary sources to conduct
-genealogical or avocational research and the kind of professional
-research done by people in private industry or the federal government.
-More important in MICHELSON's view was that, quantitatively, nothing is
-known about the ways in which, for example, humanities scholars are using
-information technology. No studies exist to offer guidance in creating
-strategies. The most recent study was conducted in 1985 by the American
-Council of Learned Societies (ACLS), and what it showed was that 50
-percent of humanities scholars at that time were using computers. That
-constitutes the extent of our knowledge.
-
-Concerning AM's strategy for orienting people toward the scope of
-electronic resources, FREEMAN could offer no hard conclusions at this
-point, because she and her colleagues were still waiting to see,
-particularly in the schools, what has been made of their efforts. Within
-the system, however, AM has provided what are called electronic exhibits-
--such as introductions to time periods and materials--and these are
-intended to offer a student user a sense of what a broadside is and what
-it might tell her or him. But FREEMAN conceded that the project staff
-would have to talk with students next year, after teachers have had a
-summer to use the materials, and attempt to discover what the students
-were learning from the materials. In addition, FREEMAN described
-supporting materials in print provided by AM at the request of local
-teachers during a meeting held at LC. These included time lines,
-bibliographies, and other materials that could be reproduced on a
-photocopier in a classroom. Teachers could walk away with and use these,
-and in this way gain a better understanding of the contents. But again,
-reaching firm conclusions concerning the manner and extent of their use
-would have to wait until next year.
-
-As to the changes she saw occurring at the National Archives and Records
-Administration (NARA) as a result of the increasing emphasis on
-technology in scholarly research, MICHELSON stated that NARA at this
-point was absorbing the report by her and Jeff Rothenberg addressing
-strategies for the archival profession in general, although not for the
-National Archives specifically. NARA is just beginning to establish its
-role and what it can do. In terms of changes and initiatives that NARA
-can take, no clear response could be given at this time.
-
-GREENFIELD remarked two trends mentioned in the session. Reflecting on
-DALY's opening comments on how he could have used a Latin collection of
-text in an electronic form, he said that at first he thought most scholars
-would be unwilling to do that. But as he thought of that in terms of the
-original meaning of research--that is, having already mastered these texts,
-researching them for critical and comparative purposes--for the first time,
-the electronic format made a lot of sense. GREENFIELD could envision
-growing numbers of scholars learning the new technologies for that very
-aspect of their scholarship and for convenience's sake.
-
-Listening to VECCIA and FREEMAN, GREENFIELD thought of an additional
-application of electronic texts. He realized that AM could be used as a
-guide to lead someone to original sources. Students cannot be expected
-to have mastered these sources, things they have never known about
-before. Thus, AM is leading them, in theory, to a vast body of
-information and giving them a superficial overview of it, enabling them
-to select parts of it. GREENFIELD asked if any evidence exists that this
-resource will indeed teach the new user, the K-12 students, how to do
-research. Scholars already know how to do research and are applying
-these new tools. But he wondered why students would go beyond picking
-out things that were most exciting to them.
-
-FREEMAN conceded the correctness of GREENFIELD's observation as applied
-to a school environment. The risk is that a student would sit down at a
-system, play with it, find some things of interest, and then walk away.
-But in the relatively controlled situation of a school library, much will
-depend on the instructions a teacher or a librarian gives a student. She
-viewed the situation not as one of fine-tuning research skills but of
-involving students at a personal level in understanding and researching
-things. Given the guidance one can receive at school, it then becomes
-possible to teach elementary research skills to students, which in fact
-one particular librarian said she was teaching her fifth graders.
-FREEMAN concluded that introducing the idea of following one's own path
-of inquiry, which is essentially what research entails, involves more
-than teaching specific skills. To these comments VECCIA added the
-observation that the individual teacher and the use of a creative
-resource, rather than AM itself, seemed to make the key difference.
-Some schools and some teachers are making excellent use of the nature
-of critical thinking and teaching skills, she said.
-
-Concurring with these remarks, DALY closed the session with the thought that
-the more that producers produced for teachers and for scholars to use with
-their students, the more successful their electronic products would prove.
-
- ******
-
-SESSION II. SHOW AND TELL
-
-Jacqueline HESS, director, National Demonstration Laboratory, served as
-moderator of the "show-and-tell" session. She noted that a
-question-and-answer period would follow each presentation.
-
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-MYLONAS * Overview and content of Perseus * Perseus' primary materials
-exist in a system-independent, archival form * A concession * Textual
-aspects of Perseus * Tools to use with the Greek text * Prepared indices
-and full-text searches in Perseus * English-Greek word search leads to
-close study of words and concepts * Navigating Perseus by tracing down
-indices * Using the iconography to perform research *
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-Elli MYLONAS, managing editor, Perseus Project, Harvard University, first
-gave an overview of Perseus, a large, collaborative effort based at
-Harvard University but with contributors and collaborators located at
-numerous universities and colleges in the United States (e.g., Bowdoin,
-Maryland, Pomona, Chicago, Virginia). Funded primarily by the
-Annenberg/CPB Project, with additional funding from Apple, Harvard, and
-the Packard Humanities Institute, among others, Perseus is a multimedia,
-hypertextual database for teaching and research on classical Greek
-civilization, which was released in February 1992 in version 1.0 and
-distributed by Yale University Press.
-
-Consisting entirely of primary materials, Perseus includes ancient Greek
-texts and translations of those texts; catalog entries--that is, museum
-catalog entries, not library catalog entries--on vases, sites, coins,
-sculpture, and archaeological objects; maps; and a dictionary, among
-other sources. The number of objects and the objects for which catalog
-entries exist are accompanied by thousands of color images, which
-constitute a major feature of the database. Perseus contains
-approximately 30 megabytes of text, an amount that will double in
-subsequent versions. In addition to these primary materials, the Perseus
-Project has been building tools for using them, making access and
-navigation easier, the goal being to build part of the electronic
-environment discussed earlier in the morning in which students or
-scholars can work with their sources.
-
-The demonstration of Perseus will show only a fraction of the real work
-that has gone into it, because the project had to face the dilemma of
-what to enter when putting something into machine-readable form: should
-one aim for very high quality or make concessions in order to get the
-material in? Since Perseus decided to opt for very high quality, all of
-its primary materials exist in a system-independent--insofar as it is
-possible to be system-independent--archival form. Deciding what that
-archival form would be and attaining it required much work and thought.
-For example, all the texts are marked up in SGML, which will be made
-compatible with the guidelines of the Text Encoding Initiative (TEI) when
-they are issued.
-
-Drawings are postscript files, not meeting international standards, but
-at least designed to go across platforms. Images, or rather the real
-archival forms, consist of the best available slides, which are being
-digitized. Much of the catalog material exists in database form--a form
-that the average user could use, manipulate, and display on a personal
-computer, but only at great cost. Thus, this is where the concession
-comes in: All of this rich, well-marked-up information is stripped of
-much of its content; the images are converted into bit-maps and the text
-into small formatted chunks. All this information can then be imported
-into HyperCard and run on a mid-range Macintosh, which is what Perseus
-users have. This fact has made it possible for Perseus to attain wide
-use fairly rapidly. Without those archival forms the HyperCard version
-being demonstrated could not be made easily, and the project could not
-have the potential to move to other forms and machines and software as
-they appear, none of which information is in Perseus on the CD.
-
-Of the numerous multimedia aspects of Perseus, MYLONAS focused on the
-textual. Part of what makes Perseus such a pleasure to use, MYLONAS
-said, is this effort at seamless integration and the ability to move
-around both visual and textual material. Perseus also made the decision
-not to attempt to interpret its material any more than one interprets by
-selecting. But, MYLONAS emphasized, Perseus is not courseware: No
-syllabus exists. There is no effort to define how one teaches a topic
-using Perseus, although the project may eventually collect papers by
-people who have used it to teach. Rather, Perseus aims to provide
-primary material in a kind of electronic library, an electronic sandbox,
-so to say, in which students and scholars who are working on this
-material can explore by themselves. With that, MYLONAS demonstrated
-Perseus, beginning with the Perseus gateway, the first thing one sees
-upon opening Perseus--an effort in part to solve the contextualizing
-problem--which tells the user what the system contains.
-
-MYLONAS demonstrated only a very small portion, beginning with primary
-texts and running off the CD-ROM. Having selected Aeschylus' Prometheus
-Bound, which was viewable in Greek and English pretty much in the same
-segments together, MYLONAS demonstrated tools to use with the Greek text,
-something not possible with a book: looking up the dictionary entry form
-of an unfamiliar word in Greek after subjecting it to Perseus'
-morphological analysis for all the texts. After finding out about a
-word, a user may then decide to see if it is used anywhere else in Greek.
-Because vast amounts of indexing support all of the primary material, one
-can find out where else all forms of a particular Greek word appear--
-often not a trivial matter because Greek is highly inflected. Further,
-since the story of Prometheus has to do with the origins of sacrifice, a
-user may wish to study and explore sacrifice in Greek literature; by
-typing sacrifice into a small window, a user goes to the English-Greek
-word list--something one cannot do without the computer (Perseus has
-indexed the definitions of its dictionary)--the string sacrifice appears
-in the definitions of these sixty-five words. One may then find out
-where any of those words is used in the work(s) of a particular author.
-The English definitions are not lemmatized.
-
-All of the indices driving this kind of usage were originally devised for
-speed, MYLONAS observed; in other words, all that kind of information--
-all forms of all words, where they exist, the dictionary form they belong
-to--were collected into databases, which will expedite searching. Then
-it was discovered that one can do things searching in these databases
-that could not be done searching in the full texts. Thus, although there
-are full-text searches in Perseus, much of the work is done behind the
-scenes, using prepared indices. Re the indexing that is done behind the
-scenes, MYLONAS pointed out that without the SGML forms of the text, it
-could not be done effectively. Much of this indexing is based on the
-structures that are made explicit by the SGML tagging.
-
-It was found that one of the things many of Perseus' non-Greek-reading
-users do is start from the dictionary and then move into the close study
-of words and concepts via this kind of English-Greek word search, by which
-means they might select a concept. This exercise has been assigned to
-students in core courses at Harvard--to study a concept by looking for the
-English word in the dictionary, finding the Greek words, and then finding
-the words in the Greek but, of course, reading across in the English.
-That tells them a great deal about what a translation means as well.
-
-Should one also wish to see images that have to do with sacrifice, that
-person would go to the object key word search, which allows one to
-perform a similar kind of index retrieval on the database of
-archaeological objects. Without words, pictures are useless; Perseus has
-not reached the point where it can do much with images that are not
-cataloged. Thus, although it is possible in Perseus with text and images
-to navigate by knowing where one wants to end up--for example, a
-red-figure vase from the Boston Museum of Fine Arts--one can perform this
-kind of navigation very easily by tracing down indices. MYLONAS
-illustrated several generic scenes of sacrifice on vases. The features
-demonstrated derived from Perseus 1.0; version 2.0 will implement even
-better means of retrieval.
-
-MYLONAS closed by looking at one of the pictures and noting again that
-one can do a great deal of research using the iconography as well as the
-texts. For instance, students in a
<TRUNCATED>
[23/51] [partial] orc git commit: ORC-204 Update and use CMake
External Project to build C++ compression libraries.
Posted by om...@apache.org.
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/amd64/amd64-match.S
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/amd64/amd64-match.S b/c++/libs/zlib-1.2.8/contrib/amd64/amd64-match.S
deleted file mode 100644
index 81d4a1c..0000000
--- a/c++/libs/zlib-1.2.8/contrib/amd64/amd64-match.S
+++ /dev/null
@@ -1,452 +0,0 @@
-/*
- * match.S -- optimized version of longest_match()
- * based on the similar work by Gilles Vollant, and Brian Raiter, written 1998
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the BSD License. Use by owners of Che Guevarra
- * parafernalia is prohibited, where possible, and highly discouraged
- * elsewhere.
- */
-
-#ifndef NO_UNDERLINE
-# define match_init _match_init
-# define longest_match _longest_match
-#endif
-
-#define scanend ebx
-#define scanendw bx
-#define chainlenwmask edx /* high word: current chain len low word: s->wmask */
-#define curmatch rsi
-#define curmatchd esi
-#define windowbestlen r8
-#define scanalign r9
-#define scanalignd r9d
-#define window r10
-#define bestlen r11
-#define bestlend r11d
-#define scanstart r12d
-#define scanstartw r12w
-#define scan r13
-#define nicematch r14d
-#define limit r15
-#define limitd r15d
-#define prev rcx
-
-/*
- * The 258 is a "magic number, not a parameter -- changing it
- * breaks the hell loose
- */
-#define MAX_MATCH (258)
-#define MIN_MATCH (3)
-#define MIN_LOOKAHEAD (MAX_MATCH + MIN_MATCH + 1)
-#define MAX_MATCH_8 ((MAX_MATCH + 7) & ~7)
-
-/* stack frame offsets */
-#define LocalVarsSize (112)
-#define _chainlenwmask ( 8-LocalVarsSize)(%rsp)
-#define _windowbestlen (16-LocalVarsSize)(%rsp)
-#define save_r14 (24-LocalVarsSize)(%rsp)
-#define save_rsi (32-LocalVarsSize)(%rsp)
-#define save_rbx (40-LocalVarsSize)(%rsp)
-#define save_r12 (56-LocalVarsSize)(%rsp)
-#define save_r13 (64-LocalVarsSize)(%rsp)
-#define save_r15 (80-LocalVarsSize)(%rsp)
-
-
-.globl match_init, longest_match
-
-/*
- * On AMD64 the first argument of a function (in our case -- the pointer to
- * deflate_state structure) is passed in %rdi, hence our offsets below are
- * all off of that.
- */
-
-/* you can check the structure offset by running
-
-#include <stdlib.h>
-#include <stdio.h>
-#include "deflate.h"
-
-void print_depl()
-{
-deflate_state ds;
-deflate_state *s=&ds;
-printf("size pointer=%u\n",(int)sizeof(void*));
-
-printf("#define dsWSize (%3u)(%%rdi)\n",(int)(((char*)&(s->w_size))-((char*)s)));
-printf("#define dsWMask (%3u)(%%rdi)\n",(int)(((char*)&(s->w_mask))-((char*)s)));
-printf("#define dsWindow (%3u)(%%rdi)\n",(int)(((char*)&(s->window))-((char*)s)));
-printf("#define dsPrev (%3u)(%%rdi)\n",(int)(((char*)&(s->prev))-((char*)s)));
-printf("#define dsMatchLen (%3u)(%%rdi)\n",(int)(((char*)&(s->match_length))-((char*)s)));
-printf("#define dsPrevMatch (%3u)(%%rdi)\n",(int)(((char*)&(s->prev_match))-((char*)s)));
-printf("#define dsStrStart (%3u)(%%rdi)\n",(int)(((char*)&(s->strstart))-((char*)s)));
-printf("#define dsMatchStart (%3u)(%%rdi)\n",(int)(((char*)&(s->match_start))-((char*)s)));
-printf("#define dsLookahead (%3u)(%%rdi)\n",(int)(((char*)&(s->lookahead))-((char*)s)));
-printf("#define dsPrevLen (%3u)(%%rdi)\n",(int)(((char*)&(s->prev_length))-((char*)s)));
-printf("#define dsMaxChainLen (%3u)(%%rdi)\n",(int)(((char*)&(s->max_chain_length))-((char*)s)));
-printf("#define dsGoodMatch (%3u)(%%rdi)\n",(int)(((char*)&(s->good_match))-((char*)s)));
-printf("#define dsNiceMatch (%3u)(%%rdi)\n",(int)(((char*)&(s->nice_match))-((char*)s)));
-}
-
-*/
-
-
-/*
- to compile for XCode 3.2 on MacOSX x86_64
- - run "gcc -g -c -DXCODE_MAC_X64_STRUCTURE amd64-match.S"
- */
-
-
-#ifndef CURRENT_LINX_XCODE_MAC_X64_STRUCTURE
-#define dsWSize ( 68)(%rdi)
-#define dsWMask ( 76)(%rdi)
-#define dsWindow ( 80)(%rdi)
-#define dsPrev ( 96)(%rdi)
-#define dsMatchLen (144)(%rdi)
-#define dsPrevMatch (148)(%rdi)
-#define dsStrStart (156)(%rdi)
-#define dsMatchStart (160)(%rdi)
-#define dsLookahead (164)(%rdi)
-#define dsPrevLen (168)(%rdi)
-#define dsMaxChainLen (172)(%rdi)
-#define dsGoodMatch (188)(%rdi)
-#define dsNiceMatch (192)(%rdi)
-
-#else
-
-#ifndef STRUCT_OFFSET
-# define STRUCT_OFFSET (0)
-#endif
-
-
-#define dsWSize ( 56 + STRUCT_OFFSET)(%rdi)
-#define dsWMask ( 64 + STRUCT_OFFSET)(%rdi)
-#define dsWindow ( 72 + STRUCT_OFFSET)(%rdi)
-#define dsPrev ( 88 + STRUCT_OFFSET)(%rdi)
-#define dsMatchLen (136 + STRUCT_OFFSET)(%rdi)
-#define dsPrevMatch (140 + STRUCT_OFFSET)(%rdi)
-#define dsStrStart (148 + STRUCT_OFFSET)(%rdi)
-#define dsMatchStart (152 + STRUCT_OFFSET)(%rdi)
-#define dsLookahead (156 + STRUCT_OFFSET)(%rdi)
-#define dsPrevLen (160 + STRUCT_OFFSET)(%rdi)
-#define dsMaxChainLen (164 + STRUCT_OFFSET)(%rdi)
-#define dsGoodMatch (180 + STRUCT_OFFSET)(%rdi)
-#define dsNiceMatch (184 + STRUCT_OFFSET)(%rdi)
-
-#endif
-
-
-
-
-.text
-
-/* uInt longest_match(deflate_state *deflatestate, IPos curmatch) */
-
-longest_match:
-/*
- * Retrieve the function arguments. %curmatch will hold cur_match
- * throughout the entire function (passed via rsi on amd64).
- * rdi will hold the pointer to the deflate_state (first arg on amd64)
- */
- mov %rsi, save_rsi
- mov %rbx, save_rbx
- mov %r12, save_r12
- mov %r13, save_r13
- mov %r14, save_r14
- mov %r15, save_r15
-
-/* uInt wmask = s->w_mask; */
-/* unsigned chain_length = s->max_chain_length; */
-/* if (s->prev_length >= s->good_match) { */
-/* chain_length >>= 2; */
-/* } */
-
- movl dsPrevLen, %eax
- movl dsGoodMatch, %ebx
- cmpl %ebx, %eax
- movl dsWMask, %eax
- movl dsMaxChainLen, %chainlenwmask
- jl LastMatchGood
- shrl $2, %chainlenwmask
-LastMatchGood:
-
-/* chainlen is decremented once beforehand so that the function can */
-/* use the sign flag instead of the zero flag for the exit test. */
-/* It is then shifted into the high word, to make room for the wmask */
-/* value, which it will always accompany. */
-
- decl %chainlenwmask
- shll $16, %chainlenwmask
- orl %eax, %chainlenwmask
-
-/* if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; */
-
- movl dsNiceMatch, %eax
- movl dsLookahead, %ebx
- cmpl %eax, %ebx
- jl LookaheadLess
- movl %eax, %ebx
-LookaheadLess: movl %ebx, %nicematch
-
-/* register Bytef *scan = s->window + s->strstart; */
-
- mov dsWindow, %window
- movl dsStrStart, %limitd
- lea (%limit, %window), %scan
-
-/* Determine how many bytes the scan ptr is off from being */
-/* dword-aligned. */
-
- mov %scan, %scanalign
- negl %scanalignd
- andl $3, %scanalignd
-
-/* IPos limit = s->strstart > (IPos)MAX_DIST(s) ? */
-/* s->strstart - (IPos)MAX_DIST(s) : NIL; */
-
- movl dsWSize, %eax
- subl $MIN_LOOKAHEAD, %eax
- xorl %ecx, %ecx
- subl %eax, %limitd
- cmovng %ecx, %limitd
-
-/* int best_len = s->prev_length; */
-
- movl dsPrevLen, %bestlend
-
-/* Store the sum of s->window + best_len in %windowbestlen locally, and in memory. */
-
- lea (%window, %bestlen), %windowbestlen
- mov %windowbestlen, _windowbestlen
-
-/* register ush scan_start = *(ushf*)scan; */
-/* register ush scan_end = *(ushf*)(scan+best_len-1); */
-/* Posf *prev = s->prev; */
-
- movzwl (%scan), %scanstart
- movzwl -1(%scan, %bestlen), %scanend
- mov dsPrev, %prev
-
-/* Jump into the main loop. */
-
- movl %chainlenwmask, _chainlenwmask
- jmp LoopEntry
-
-.balign 16
-
-/* do {
- * match = s->window + cur_match;
- * if (*(ushf*)(match+best_len-1) != scan_end ||
- * *(ushf*)match != scan_start) continue;
- * [...]
- * } while ((cur_match = prev[cur_match & wmask]) > limit
- * && --chain_length != 0);
- *
- * Here is the inner loop of the function. The function will spend the
- * majority of its time in this loop, and majority of that time will
- * be spent in the first ten instructions.
- */
-LookupLoop:
- andl %chainlenwmask, %curmatchd
- movzwl (%prev, %curmatch, 2), %curmatchd
- cmpl %limitd, %curmatchd
- jbe LeaveNow
- subl $0x00010000, %chainlenwmask
- js LeaveNow
-LoopEntry: cmpw -1(%windowbestlen, %curmatch), %scanendw
- jne LookupLoop
- cmpw %scanstartw, (%window, %curmatch)
- jne LookupLoop
-
-/* Store the current value of chainlen. */
- movl %chainlenwmask, _chainlenwmask
-
-/* %scan is the string under scrutiny, and %prev to the string we */
-/* are hoping to match it up with. In actuality, %esi and %edi are */
-/* both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and %edx is */
-/* initialized to -(MAX_MATCH_8 - scanalign). */
-
- mov $(-MAX_MATCH_8), %rdx
- lea (%curmatch, %window), %windowbestlen
- lea MAX_MATCH_8(%windowbestlen, %scanalign), %windowbestlen
- lea MAX_MATCH_8(%scan, %scanalign), %prev
-
-/* the prefetching below makes very little difference... */
- prefetcht1 (%windowbestlen, %rdx)
- prefetcht1 (%prev, %rdx)
-
-/*
- * Test the strings for equality, 8 bytes at a time. At the end,
- * adjust %rdx so that it is offset to the exact byte that mismatched.
- *
- * It should be confessed that this loop usually does not represent
- * much of the total running time. Replacing it with a more
- * straightforward "rep cmpsb" would not drastically degrade
- * performance -- unrolling it, for example, makes no difference.
- */
-
-#undef USE_SSE /* works, but is 6-7% slower, than non-SSE... */
-
-LoopCmps:
-#ifdef USE_SSE
- /* Preload the SSE registers */
- movdqu (%windowbestlen, %rdx), %xmm1
- movdqu (%prev, %rdx), %xmm2
- pcmpeqb %xmm2, %xmm1
- movdqu 16(%windowbestlen, %rdx), %xmm3
- movdqu 16(%prev, %rdx), %xmm4
- pcmpeqb %xmm4, %xmm3
- movdqu 32(%windowbestlen, %rdx), %xmm5
- movdqu 32(%prev, %rdx), %xmm6
- pcmpeqb %xmm6, %xmm5
- movdqu 48(%windowbestlen, %rdx), %xmm7
- movdqu 48(%prev, %rdx), %xmm8
- pcmpeqb %xmm8, %xmm7
-
- /* Check the comparisions' results */
- pmovmskb %xmm1, %rax
- notw %ax
- bsfw %ax, %ax
- jnz LeaveLoopCmps
-
- /* this is the only iteration of the loop with a possibility of having
- incremented rdx by 0x108 (each loop iteration add 16*4 = 0x40
- and (0x40*4)+8=0x108 */
- add $8, %rdx
- jz LenMaximum
- add $8, %rdx
-
-
- pmovmskb %xmm3, %rax
- notw %ax
- bsfw %ax, %ax
- jnz LeaveLoopCmps
-
-
- add $16, %rdx
-
-
- pmovmskb %xmm5, %rax
- notw %ax
- bsfw %ax, %ax
- jnz LeaveLoopCmps
-
- add $16, %rdx
-
-
- pmovmskb %xmm7, %rax
- notw %ax
- bsfw %ax, %ax
- jnz LeaveLoopCmps
-
- add $16, %rdx
-
- jmp LoopCmps
-LeaveLoopCmps: add %rax, %rdx
-#else
- mov (%windowbestlen, %rdx), %rax
- xor (%prev, %rdx), %rax
- jnz LeaveLoopCmps
-
- mov 8(%windowbestlen, %rdx), %rax
- xor 8(%prev, %rdx), %rax
- jnz LeaveLoopCmps8
-
- mov 16(%windowbestlen, %rdx), %rax
- xor 16(%prev, %rdx), %rax
- jnz LeaveLoopCmps16
-
- add $24, %rdx
- jnz LoopCmps
- jmp LenMaximum
-# if 0
-/*
- * This three-liner is tantalizingly simple, but bsf is a slow instruction,
- * and the complicated alternative down below is quite a bit faster. Sad...
- */
-
-LeaveLoopCmps: bsf %rax, %rax /* find the first non-zero bit */
- shrl $3, %eax /* divide by 8 to get the byte */
- add %rax, %rdx
-# else
-LeaveLoopCmps16:
- add $8, %rdx
-LeaveLoopCmps8:
- add $8, %rdx
-LeaveLoopCmps: testl $0xFFFFFFFF, %eax /* Check the first 4 bytes */
- jnz Check16
- add $4, %rdx
- shr $32, %rax
-Check16: testw $0xFFFF, %ax
- jnz LenLower
- add $2, %rdx
- shrl $16, %eax
-LenLower: subb $1, %al
- adc $0, %rdx
-# endif
-#endif
-
-/* Calculate the length of the match. If it is longer than MAX_MATCH, */
-/* then automatically accept it as the best possible match and leave. */
-
- lea (%prev, %rdx), %rax
- sub %scan, %rax
- cmpl $MAX_MATCH, %eax
- jge LenMaximum
-
-/* If the length of the match is not longer than the best match we */
-/* have so far, then forget it and return to the lookup loop. */
-
- cmpl %bestlend, %eax
- jg LongerMatch
- mov _windowbestlen, %windowbestlen
- mov dsPrev, %prev
- movl _chainlenwmask, %edx
- jmp LookupLoop
-
-/* s->match_start = cur_match; */
-/* best_len = len; */
-/* if (len >= nice_match) break; */
-/* scan_end = *(ushf*)(scan+best_len-1); */
-
-LongerMatch:
- movl %eax, %bestlend
- movl %curmatchd, dsMatchStart
- cmpl %nicematch, %eax
- jge LeaveNow
-
- lea (%window, %bestlen), %windowbestlen
- mov %windowbestlen, _windowbestlen
-
- movzwl -1(%scan, %rax), %scanend
- mov dsPrev, %prev
- movl _chainlenwmask, %chainlenwmask
- jmp LookupLoop
-
-/* Accept the current string, with the maximum possible length. */
-
-LenMaximum:
- movl $MAX_MATCH, %bestlend
- movl %curmatchd, dsMatchStart
-
-/* if ((uInt)best_len <= s->lookahead) return (uInt)best_len; */
-/* return s->lookahead; */
-
-LeaveNow:
- movl dsLookahead, %eax
- cmpl %eax, %bestlend
- cmovngl %bestlend, %eax
-LookaheadRet:
-
-/* Restore the registers and return from whence we came. */
-
- mov save_rsi, %rsi
- mov save_rbx, %rbx
- mov save_r12, %r12
- mov save_r13, %r13
- mov save_r14, %r14
- mov save_r15, %r15
-
- ret
-
-match_init: ret
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/asm686/README.686
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/asm686/README.686 b/c++/libs/zlib-1.2.8/contrib/asm686/README.686
deleted file mode 100644
index a0bf3be..0000000
--- a/c++/libs/zlib-1.2.8/contrib/asm686/README.686
+++ /dev/null
@@ -1,51 +0,0 @@
-This is a patched version of zlib, modified to use
-Pentium-Pro-optimized assembly code in the deflation algorithm. The
-files changed/added by this patch are:
-
-README.686
-match.S
-
-The speedup that this patch provides varies, depending on whether the
-compiler used to build the original version of zlib falls afoul of the
-PPro's speed traps. My own tests show a speedup of around 10-20% at
-the default compression level, and 20-30% using -9, against a version
-compiled using gcc 2.7.2.3. Your mileage may vary.
-
-Note that this code has been tailored for the PPro/PII in particular,
-and will not perform particuarly well on a Pentium.
-
-If you are using an assembler other than GNU as, you will have to
-translate match.S to use your assembler's syntax. (Have fun.)
-
-Brian Raiter
-breadbox@muppetlabs.com
-April, 1998
-
-
-Added for zlib 1.1.3:
-
-The patches come from
-http://www.muppetlabs.com/~breadbox/software/assembly.html
-
-To compile zlib with this asm file, copy match.S to the zlib directory
-then do:
-
-CFLAGS="-O3 -DASMV" ./configure
-make OBJA=match.o
-
-
-Update:
-
-I've been ignoring these assembly routines for years, believing that
-gcc's generated code had caught up with it sometime around gcc 2.95
-and the major rearchitecting of the Pentium 4. However, I recently
-learned that, despite what I believed, this code still has some life
-in it. On the Pentium 4 and AMD64 chips, it continues to run about 8%
-faster than the code produced by gcc 4.1.
-
-In acknowledgement of its continuing usefulness, I've altered the
-license to match that of the rest of zlib. Share and Enjoy!
-
-Brian Raiter
-breadbox@muppetlabs.com
-April, 2007
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/asm686/match.S
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/asm686/match.S b/c++/libs/zlib-1.2.8/contrib/asm686/match.S
deleted file mode 100644
index fa42109..0000000
--- a/c++/libs/zlib-1.2.8/contrib/asm686/match.S
+++ /dev/null
@@ -1,357 +0,0 @@
-/* match.S -- x86 assembly version of the zlib longest_match() function.
- * Optimized for the Intel 686 chips (PPro and later).
- *
- * Copyright (C) 1998, 2007 Brian Raiter <br...@muppetlabs.com>
- *
- * This software is provided 'as-is', without any express or implied
- * warranty. In no event will the author be held liable for any damages
- * arising from the use of this software.
- *
- * Permission is granted to anyone to use this software for any purpose,
- * including commercial applications, and to alter it and redistribute it
- * freely, subject to the following restrictions:
- *
- * 1. The origin of this software must not be misrepresented; you must not
- * claim that you wrote the original software. If you use this software
- * in a product, an acknowledgment in the product documentation would be
- * appreciated but is not required.
- * 2. Altered source versions must be plainly marked as such, and must not be
- * misrepresented as being the original software.
- * 3. This notice may not be removed or altered from any source distribution.
- */
-
-#ifndef NO_UNDERLINE
-#define match_init _match_init
-#define longest_match _longest_match
-#endif
-
-#define MAX_MATCH (258)
-#define MIN_MATCH (3)
-#define MIN_LOOKAHEAD (MAX_MATCH + MIN_MATCH + 1)
-#define MAX_MATCH_8 ((MAX_MATCH + 7) & ~7)
-
-/* stack frame offsets */
-
-#define chainlenwmask 0 /* high word: current chain len */
- /* low word: s->wmask */
-#define window 4 /* local copy of s->window */
-#define windowbestlen 8 /* s->window + bestlen */
-#define scanstart 16 /* first two bytes of string */
-#define scanend 12 /* last two bytes of string */
-#define scanalign 20 /* dword-misalignment of string */
-#define nicematch 24 /* a good enough match size */
-#define bestlen 28 /* size of best match so far */
-#define scan 32 /* ptr to string wanting match */
-
-#define LocalVarsSize (36)
-/* saved ebx 36 */
-/* saved edi 40 */
-/* saved esi 44 */
-/* saved ebp 48 */
-/* return address 52 */
-#define deflatestate 56 /* the function arguments */
-#define curmatch 60
-
-/* All the +zlib1222add offsets are due to the addition of fields
- * in zlib in the deflate_state structure since the asm code was first written
- * (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)").
- * (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0").
- * if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8").
- */
-
-#define zlib1222add (8)
-
-#define dsWSize (36+zlib1222add)
-#define dsWMask (44+zlib1222add)
-#define dsWindow (48+zlib1222add)
-#define dsPrev (56+zlib1222add)
-#define dsMatchLen (88+zlib1222add)
-#define dsPrevMatch (92+zlib1222add)
-#define dsStrStart (100+zlib1222add)
-#define dsMatchStart (104+zlib1222add)
-#define dsLookahead (108+zlib1222add)
-#define dsPrevLen (112+zlib1222add)
-#define dsMaxChainLen (116+zlib1222add)
-#define dsGoodMatch (132+zlib1222add)
-#define dsNiceMatch (136+zlib1222add)
-
-
-.file "match.S"
-
-.globl match_init, longest_match
-
-.text
-
-/* uInt longest_match(deflate_state *deflatestate, IPos curmatch) */
-.cfi_sections .debug_frame
-
-longest_match:
-
-.cfi_startproc
-/* Save registers that the compiler may be using, and adjust %esp to */
-/* make room for our stack frame. */
-
- pushl %ebp
- .cfi_def_cfa_offset 8
- .cfi_offset ebp, -8
- pushl %edi
- .cfi_def_cfa_offset 12
- pushl %esi
- .cfi_def_cfa_offset 16
- pushl %ebx
- .cfi_def_cfa_offset 20
- subl $LocalVarsSize, %esp
- .cfi_def_cfa_offset LocalVarsSize+20
-
-/* Retrieve the function arguments. %ecx will hold cur_match */
-/* throughout the entire function. %edx will hold the pointer to the */
-/* deflate_state structure during the function's setup (before */
-/* entering the main loop). */
-
- movl deflatestate(%esp), %edx
- movl curmatch(%esp), %ecx
-
-/* uInt wmask = s->w_mask; */
-/* unsigned chain_length = s->max_chain_length; */
-/* if (s->prev_length >= s->good_match) { */
-/* chain_length >>= 2; */
-/* } */
-
- movl dsPrevLen(%edx), %eax
- movl dsGoodMatch(%edx), %ebx
- cmpl %ebx, %eax
- movl dsWMask(%edx), %eax
- movl dsMaxChainLen(%edx), %ebx
- jl LastMatchGood
- shrl $2, %ebx
-LastMatchGood:
-
-/* chainlen is decremented once beforehand so that the function can */
-/* use the sign flag instead of the zero flag for the exit test. */
-/* It is then shifted into the high word, to make room for the wmask */
-/* value, which it will always accompany. */
-
- decl %ebx
- shll $16, %ebx
- orl %eax, %ebx
- movl %ebx, chainlenwmask(%esp)
-
-/* if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; */
-
- movl dsNiceMatch(%edx), %eax
- movl dsLookahead(%edx), %ebx
- cmpl %eax, %ebx
- jl LookaheadLess
- movl %eax, %ebx
-LookaheadLess: movl %ebx, nicematch(%esp)
-
-/* register Bytef *scan = s->window + s->strstart; */
-
- movl dsWindow(%edx), %esi
- movl %esi, window(%esp)
- movl dsStrStart(%edx), %ebp
- lea (%esi,%ebp), %edi
- movl %edi, scan(%esp)
-
-/* Determine how many bytes the scan ptr is off from being */
-/* dword-aligned. */
-
- movl %edi, %eax
- negl %eax
- andl $3, %eax
- movl %eax, scanalign(%esp)
-
-/* IPos limit = s->strstart > (IPos)MAX_DIST(s) ? */
-/* s->strstart - (IPos)MAX_DIST(s) : NIL; */
-
- movl dsWSize(%edx), %eax
- subl $MIN_LOOKAHEAD, %eax
- subl %eax, %ebp
- jg LimitPositive
- xorl %ebp, %ebp
-LimitPositive:
-
-/* int best_len = s->prev_length; */
-
- movl dsPrevLen(%edx), %eax
- movl %eax, bestlen(%esp)
-
-/* Store the sum of s->window + best_len in %esi locally, and in %esi. */
-
- addl %eax, %esi
- movl %esi, windowbestlen(%esp)
-
-/* register ush scan_start = *(ushf*)scan; */
-/* register ush scan_end = *(ushf*)(scan+best_len-1); */
-/* Posf *prev = s->prev; */
-
- movzwl (%edi), %ebx
- movl %ebx, scanstart(%esp)
- movzwl -1(%edi,%eax), %ebx
- movl %ebx, scanend(%esp)
- movl dsPrev(%edx), %edi
-
-/* Jump into the main loop. */
-
- movl chainlenwmask(%esp), %edx
- jmp LoopEntry
-
-.balign 16
-
-/* do {
- * match = s->window + cur_match;
- * if (*(ushf*)(match+best_len-1) != scan_end ||
- * *(ushf*)match != scan_start) continue;
- * [...]
- * } while ((cur_match = prev[cur_match & wmask]) > limit
- * && --chain_length != 0);
- *
- * Here is the inner loop of the function. The function will spend the
- * majority of its time in this loop, and majority of that time will
- * be spent in the first ten instructions.
- *
- * Within this loop:
- * %ebx = scanend
- * %ecx = curmatch
- * %edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)
- * %esi = windowbestlen - i.e., (window + bestlen)
- * %edi = prev
- * %ebp = limit
- */
-LookupLoop:
- andl %edx, %ecx
- movzwl (%edi,%ecx,2), %ecx
- cmpl %ebp, %ecx
- jbe LeaveNow
- subl $0x00010000, %edx
- js LeaveNow
-LoopEntry: movzwl -1(%esi,%ecx), %eax
- cmpl %ebx, %eax
- jnz LookupLoop
- movl window(%esp), %eax
- movzwl (%eax,%ecx), %eax
- cmpl scanstart(%esp), %eax
- jnz LookupLoop
-
-/* Store the current value of chainlen. */
-
- movl %edx, chainlenwmask(%esp)
-
-/* Point %edi to the string under scrutiny, and %esi to the string we */
-/* are hoping to match it up with. In actuality, %esi and %edi are */
-/* both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and %edx is */
-/* initialized to -(MAX_MATCH_8 - scanalign). */
-
- movl window(%esp), %esi
- movl scan(%esp), %edi
- addl %ecx, %esi
- movl scanalign(%esp), %eax
- movl $(-MAX_MATCH_8), %edx
- lea MAX_MATCH_8(%edi,%eax), %edi
- lea MAX_MATCH_8(%esi,%eax), %esi
-
-/* Test the strings for equality, 8 bytes at a time. At the end,
- * adjust %edx so that it is offset to the exact byte that mismatched.
- *
- * We already know at this point that the first three bytes of the
- * strings match each other, and they can be safely passed over before
- * starting the compare loop. So what this code does is skip over 0-3
- * bytes, as much as necessary in order to dword-align the %edi
- * pointer. (%esi will still be misaligned three times out of four.)
- *
- * It should be confessed that this loop usually does not represent
- * much of the total running time. Replacing it with a more
- * straightforward "rep cmpsb" would not drastically degrade
- * performance.
- */
-LoopCmps:
- movl (%esi,%edx), %eax
- xorl (%edi,%edx), %eax
- jnz LeaveLoopCmps
- movl 4(%esi,%edx), %eax
- xorl 4(%edi,%edx), %eax
- jnz LeaveLoopCmps4
- addl $8, %edx
- jnz LoopCmps
- jmp LenMaximum
-LeaveLoopCmps4: addl $4, %edx
-LeaveLoopCmps: testl $0x0000FFFF, %eax
- jnz LenLower
- addl $2, %edx
- shrl $16, %eax
-LenLower: subb $1, %al
- adcl $0, %edx
-
-/* Calculate the length of the match. If it is longer than MAX_MATCH, */
-/* then automatically accept it as the best possible match and leave. */
-
- lea (%edi,%edx), %eax
- movl scan(%esp), %edi
- subl %edi, %eax
- cmpl $MAX_MATCH, %eax
- jge LenMaximum
-
-/* If the length of the match is not longer than the best match we */
-/* have so far, then forget it and return to the lookup loop. */
-
- movl deflatestate(%esp), %edx
- movl bestlen(%esp), %ebx
- cmpl %ebx, %eax
- jg LongerMatch
- movl windowbestlen(%esp), %esi
- movl dsPrev(%edx), %edi
- movl scanend(%esp), %ebx
- movl chainlenwmask(%esp), %edx
- jmp LookupLoop
-
-/* s->match_start = cur_match; */
-/* best_len = len; */
-/* if (len >= nice_match) break; */
-/* scan_end = *(ushf*)(scan+best_len-1); */
-
-LongerMatch: movl nicematch(%esp), %ebx
- movl %eax, bestlen(%esp)
- movl %ecx, dsMatchStart(%edx)
- cmpl %ebx, %eax
- jge LeaveNow
- movl window(%esp), %esi
- addl %eax, %esi
- movl %esi, windowbestlen(%esp)
- movzwl -1(%edi,%eax), %ebx
- movl dsPrev(%edx), %edi
- movl %ebx, scanend(%esp)
- movl chainlenwmask(%esp), %edx
- jmp LookupLoop
-
-/* Accept the current string, with the maximum possible length. */
-
-LenMaximum: movl deflatestate(%esp), %edx
- movl $MAX_MATCH, bestlen(%esp)
- movl %ecx, dsMatchStart(%edx)
-
-/* if ((uInt)best_len <= s->lookahead) return (uInt)best_len; */
-/* return s->lookahead; */
-
-LeaveNow:
- movl deflatestate(%esp), %edx
- movl bestlen(%esp), %ebx
- movl dsLookahead(%edx), %eax
- cmpl %eax, %ebx
- jg LookaheadRet
- movl %ebx, %eax
-LookaheadRet:
-
-/* Restore the stack and return from whence we came. */
-
- addl $LocalVarsSize, %esp
- .cfi_def_cfa_offset 20
- popl %ebx
- .cfi_def_cfa_offset 16
- popl %esi
- .cfi_def_cfa_offset 12
- popl %edi
- .cfi_def_cfa_offset 8
- popl %ebp
- .cfi_def_cfa_offset 4
-.cfi_endproc
-match_init: ret
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/blast/Makefile
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/blast/Makefile b/c++/libs/zlib-1.2.8/contrib/blast/Makefile
deleted file mode 100644
index 9be80ba..0000000
--- a/c++/libs/zlib-1.2.8/contrib/blast/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-blast: blast.c blast.h
- cc -DTEST -o blast blast.c
-
-test: blast
- blast < test.pk | cmp - test.txt
-
-clean:
- rm -f blast blast.o
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/blast/README
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/blast/README b/c++/libs/zlib-1.2.8/contrib/blast/README
deleted file mode 100644
index e3a60b3..0000000
--- a/c++/libs/zlib-1.2.8/contrib/blast/README
+++ /dev/null
@@ -1,4 +0,0 @@
-Read blast.h for purpose and usage.
-
-Mark Adler
-madler@alumni.caltech.edu
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/blast/blast.c
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/blast/blast.c b/c++/libs/zlib-1.2.8/contrib/blast/blast.c
deleted file mode 100644
index 69ef0fe..0000000
--- a/c++/libs/zlib-1.2.8/contrib/blast/blast.c
+++ /dev/null
@@ -1,446 +0,0 @@
-/* blast.c
- * Copyright (C) 2003, 2012 Mark Adler
- * For conditions of distribution and use, see copyright notice in blast.h
- * version 1.2, 24 Oct 2012
- *
- * blast.c decompresses data compressed by the PKWare Compression Library.
- * This function provides functionality similar to the explode() function of
- * the PKWare library, hence the name "blast".
- *
- * This decompressor is based on the excellent format description provided by
- * Ben Rudiak-Gould in comp.compression on August 13, 2001. Interestingly, the
- * example Ben provided in the post is incorrect. The distance 110001 should
- * instead be 111000. When corrected, the example byte stream becomes:
- *
- * 00 04 82 24 25 8f 80 7f
- *
- * which decompresses to "AIAIAIAIAIAIA" (without the quotes).
- */
-
-/*
- * Change history:
- *
- * 1.0 12 Feb 2003 - First version
- * 1.1 16 Feb 2003 - Fixed distance check for > 4 GB uncompressed data
- * 1.2 24 Oct 2012 - Add note about using binary mode in stdio
- * - Fix comparisons of differently signed integers
- */
-
-#include <setjmp.h> /* for setjmp(), longjmp(), and jmp_buf */
-#include "blast.h" /* prototype for blast() */
-
-#define local static /* for local function definitions */
-#define MAXBITS 13 /* maximum code length */
-#define MAXWIN 4096 /* maximum window size */
-
-/* input and output state */
-struct state {
- /* input state */
- blast_in infun; /* input function provided by user */
- void *inhow; /* opaque information passed to infun() */
- unsigned char *in; /* next input location */
- unsigned left; /* available input at in */
- int bitbuf; /* bit buffer */
- int bitcnt; /* number of bits in bit buffer */
-
- /* input limit error return state for bits() and decode() */
- jmp_buf env;
-
- /* output state */
- blast_out outfun; /* output function provided by user */
- void *outhow; /* opaque information passed to outfun() */
- unsigned next; /* index of next write location in out[] */
- int first; /* true to check distances (for first 4K) */
- unsigned char out[MAXWIN]; /* output buffer and sliding window */
-};
-
-/*
- * Return need bits from the input stream. This always leaves less than
- * eight bits in the buffer. bits() works properly for need == 0.
- *
- * Format notes:
- *
- * - Bits are stored in bytes from the least significant bit to the most
- * significant bit. Therefore bits are dropped from the bottom of the bit
- * buffer, using shift right, and new bytes are appended to the top of the
- * bit buffer, using shift left.
- */
-local int bits(struct state *s, int need)
-{
- int val; /* bit accumulator */
-
- /* load at least need bits into val */
- val = s->bitbuf;
- while (s->bitcnt < need) {
- if (s->left == 0) {
- s->left = s->infun(s->inhow, &(s->in));
- if (s->left == 0) longjmp(s->env, 1); /* out of input */
- }
- val |= (int)(*(s->in)++) << s->bitcnt; /* load eight bits */
- s->left--;
- s->bitcnt += 8;
- }
-
- /* drop need bits and update buffer, always zero to seven bits left */
- s->bitbuf = val >> need;
- s->bitcnt -= need;
-
- /* return need bits, zeroing the bits above that */
- return val & ((1 << need) - 1);
-}
-
-/*
- * Huffman code decoding tables. count[1..MAXBITS] is the number of symbols of
- * each length, which for a canonical code are stepped through in order.
- * symbol[] are the symbol values in canonical order, where the number of
- * entries is the sum of the counts in count[]. The decoding process can be
- * seen in the function decode() below.
- */
-struct huffman {
- short *count; /* number of symbols of each length */
- short *symbol; /* canonically ordered symbols */
-};
-
-/*
- * Decode a code from the stream s using huffman table h. Return the symbol or
- * a negative value if there is an error. If all of the lengths are zero, i.e.
- * an empty code, or if the code is incomplete and an invalid code is received,
- * then -9 is returned after reading MAXBITS bits.
- *
- * Format notes:
- *
- * - The codes as stored in the compressed data are bit-reversed relative to
- * a simple integer ordering of codes of the same lengths. Hence below the
- * bits are pulled from the compressed data one at a time and used to
- * build the code value reversed from what is in the stream in order to
- * permit simple integer comparisons for decoding.
- *
- * - The first code for the shortest length is all ones. Subsequent codes of
- * the same length are simply integer decrements of the previous code. When
- * moving up a length, a one bit is appended to the code. For a complete
- * code, the last code of the longest length will be all zeros. To support
- * this ordering, the bits pulled during decoding are inverted to apply the
- * more "natural" ordering starting with all zeros and incrementing.
- */
-local int decode(struct state *s, struct huffman *h)
-{
- int len; /* current number of bits in code */
- int code; /* len bits being decoded */
- int first; /* first code of length len */
- int count; /* number of codes of length len */
- int index; /* index of first code of length len in symbol table */
- int bitbuf; /* bits from stream */
- int left; /* bits left in next or left to process */
- short *next; /* next number of codes */
-
- bitbuf = s->bitbuf;
- left = s->bitcnt;
- code = first = index = 0;
- len = 1;
- next = h->count + 1;
- while (1) {
- while (left--) {
- code |= (bitbuf & 1) ^ 1; /* invert code */
- bitbuf >>= 1;
- count = *next++;
- if (code < first + count) { /* if length len, return symbol */
- s->bitbuf = bitbuf;
- s->bitcnt = (s->bitcnt - len) & 7;
- return h->symbol[index + (code - first)];
- }
- index += count; /* else update for next length */
- first += count;
- first <<= 1;
- code <<= 1;
- len++;
- }
- left = (MAXBITS+1) - len;
- if (left == 0) break;
- if (s->left == 0) {
- s->left = s->infun(s->inhow, &(s->in));
- if (s->left == 0) longjmp(s->env, 1); /* out of input */
- }
- bitbuf = *(s->in)++;
- s->left--;
- if (left > 8) left = 8;
- }
- return -9; /* ran out of codes */
-}
-
-/*
- * Given a list of repeated code lengths rep[0..n-1], where each byte is a
- * count (high four bits + 1) and a code length (low four bits), generate the
- * list of code lengths. This compaction reduces the size of the object code.
- * Then given the list of code lengths length[0..n-1] representing a canonical
- * Huffman code for n symbols, construct the tables required to decode those
- * codes. Those tables are the number of codes of each length, and the symbols
- * sorted by length, retaining their original order within each length. The
- * return value is zero for a complete code set, negative for an over-
- * subscribed code set, and positive for an incomplete code set. The tables
- * can be used if the return value is zero or positive, but they cannot be used
- * if the return value is negative. If the return value is zero, it is not
- * possible for decode() using that table to return an error--any stream of
- * enough bits will resolve to a symbol. If the return value is positive, then
- * it is possible for decode() using that table to return an error for received
- * codes past the end of the incomplete lengths.
- */
-local int construct(struct huffman *h, const unsigned char *rep, int n)
-{
- int symbol; /* current symbol when stepping through length[] */
- int len; /* current length when stepping through h->count[] */
- int left; /* number of possible codes left of current length */
- short offs[MAXBITS+1]; /* offsets in symbol table for each length */
- short length[256]; /* code lengths */
-
- /* convert compact repeat counts into symbol bit length list */
- symbol = 0;
- do {
- len = *rep++;
- left = (len >> 4) + 1;
- len &= 15;
- do {
- length[symbol++] = len;
- } while (--left);
- } while (--n);
- n = symbol;
-
- /* count number of codes of each length */
- for (len = 0; len <= MAXBITS; len++)
- h->count[len] = 0;
- for (symbol = 0; symbol < n; symbol++)
- (h->count[length[symbol]])++; /* assumes lengths are within bounds */
- if (h->count[0] == n) /* no codes! */
- return 0; /* complete, but decode() will fail */
-
- /* check for an over-subscribed or incomplete set of lengths */
- left = 1; /* one possible code of zero length */
- for (len = 1; len <= MAXBITS; len++) {
- left <<= 1; /* one more bit, double codes left */
- left -= h->count[len]; /* deduct count from possible codes */
- if (left < 0) return left; /* over-subscribed--return negative */
- } /* left > 0 means incomplete */
-
- /* generate offsets into symbol table for each length for sorting */
- offs[1] = 0;
- for (len = 1; len < MAXBITS; len++)
- offs[len + 1] = offs[len] + h->count[len];
-
- /*
- * put symbols in table sorted by length, by symbol order within each
- * length
- */
- for (symbol = 0; symbol < n; symbol++)
- if (length[symbol] != 0)
- h->symbol[offs[length[symbol]]++] = symbol;
-
- /* return zero for complete set, positive for incomplete set */
- return left;
-}
-
-/*
- * Decode PKWare Compression Library stream.
- *
- * Format notes:
- *
- * - First byte is 0 if literals are uncoded or 1 if they are coded. Second
- * byte is 4, 5, or 6 for the number of extra bits in the distance code.
- * This is the base-2 logarithm of the dictionary size minus six.
- *
- * - Compressed data is a combination of literals and length/distance pairs
- * terminated by an end code. Literals are either Huffman coded or
- * uncoded bytes. A length/distance pair is a coded length followed by a
- * coded distance to represent a string that occurs earlier in the
- * uncompressed data that occurs again at the current location.
- *
- * - A bit preceding a literal or length/distance pair indicates which comes
- * next, 0 for literals, 1 for length/distance.
- *
- * - If literals are uncoded, then the next eight bits are the literal, in the
- * normal bit order in th stream, i.e. no bit-reversal is needed. Similarly,
- * no bit reversal is needed for either the length extra bits or the distance
- * extra bits.
- *
- * - Literal bytes are simply written to the output. A length/distance pair is
- * an instruction to copy previously uncompressed bytes to the output. The
- * copy is from distance bytes back in the output stream, copying for length
- * bytes.
- *
- * - Distances pointing before the beginning of the output data are not
- * permitted.
- *
- * - Overlapped copies, where the length is greater than the distance, are
- * allowed and common. For example, a distance of one and a length of 518
- * simply copies the last byte 518 times. A distance of four and a length of
- * twelve copies the last four bytes three times. A simple forward copy
- * ignoring whether the length is greater than the distance or not implements
- * this correctly.
- */
-local int decomp(struct state *s)
-{
- int lit; /* true if literals are coded */
- int dict; /* log2(dictionary size) - 6 */
- int symbol; /* decoded symbol, extra bits for distance */
- int len; /* length for copy */
- unsigned dist; /* distance for copy */
- int copy; /* copy counter */
- unsigned char *from, *to; /* copy pointers */
- static int virgin = 1; /* build tables once */
- static short litcnt[MAXBITS+1], litsym[256]; /* litcode memory */
- static short lencnt[MAXBITS+1], lensym[16]; /* lencode memory */
- static short distcnt[MAXBITS+1], distsym[64]; /* distcode memory */
- static struct huffman litcode = {litcnt, litsym}; /* length code */
- static struct huffman lencode = {lencnt, lensym}; /* length code */
- static struct huffman distcode = {distcnt, distsym};/* distance code */
- /* bit lengths of literal codes */
- static const unsigned char litlen[] = {
- 11, 124, 8, 7, 28, 7, 188, 13, 76, 4, 10, 8, 12, 10, 12, 10, 8, 23, 8,
- 9, 7, 6, 7, 8, 7, 6, 55, 8, 23, 24, 12, 11, 7, 9, 11, 12, 6, 7, 22, 5,
- 7, 24, 6, 11, 9, 6, 7, 22, 7, 11, 38, 7, 9, 8, 25, 11, 8, 11, 9, 12,
- 8, 12, 5, 38, 5, 38, 5, 11, 7, 5, 6, 21, 6, 10, 53, 8, 7, 24, 10, 27,
- 44, 253, 253, 253, 252, 252, 252, 13, 12, 45, 12, 45, 12, 61, 12, 45,
- 44, 173};
- /* bit lengths of length codes 0..15 */
- static const unsigned char lenlen[] = {2, 35, 36, 53, 38, 23};
- /* bit lengths of distance codes 0..63 */
- static const unsigned char distlen[] = {2, 20, 53, 230, 247, 151, 248};
- static const short base[16] = { /* base for length codes */
- 3, 2, 4, 5, 6, 7, 8, 9, 10, 12, 16, 24, 40, 72, 136, 264};
- static const char extra[16] = { /* extra bits for length codes */
- 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8};
-
- /* set up decoding tables (once--might not be thread-safe) */
- if (virgin) {
- construct(&litcode, litlen, sizeof(litlen));
- construct(&lencode, lenlen, sizeof(lenlen));
- construct(&distcode, distlen, sizeof(distlen));
- virgin = 0;
- }
-
- /* read header */
- lit = bits(s, 8);
- if (lit > 1) return -1;
- dict = bits(s, 8);
- if (dict < 4 || dict > 6) return -2;
-
- /* decode literals and length/distance pairs */
- do {
- if (bits(s, 1)) {
- /* get length */
- symbol = decode(s, &lencode);
- len = base[symbol] + bits(s, extra[symbol]);
- if (len == 519) break; /* end code */
-
- /* get distance */
- symbol = len == 2 ? 2 : dict;
- dist = decode(s, &distcode) << symbol;
- dist += bits(s, symbol);
- dist++;
- if (s->first && dist > s->next)
- return -3; /* distance too far back */
-
- /* copy length bytes from distance bytes back */
- do {
- to = s->out + s->next;
- from = to - dist;
- copy = MAXWIN;
- if (s->next < dist) {
- from += copy;
- copy = dist;
- }
- copy -= s->next;
- if (copy > len) copy = len;
- len -= copy;
- s->next += copy;
- do {
- *to++ = *from++;
- } while (--copy);
- if (s->next == MAXWIN) {
- if (s->outfun(s->outhow, s->out, s->next)) return 1;
- s->next = 0;
- s->first = 0;
- }
- } while (len != 0);
- }
- else {
- /* get literal and write it */
- symbol = lit ? decode(s, &litcode) : bits(s, 8);
- s->out[s->next++] = symbol;
- if (s->next == MAXWIN) {
- if (s->outfun(s->outhow, s->out, s->next)) return 1;
- s->next = 0;
- s->first = 0;
- }
- }
- } while (1);
- return 0;
-}
-
-/* See comments in blast.h */
-int blast(blast_in infun, void *inhow, blast_out outfun, void *outhow)
-{
- struct state s; /* input/output state */
- int err; /* return value */
-
- /* initialize input state */
- s.infun = infun;
- s.inhow = inhow;
- s.left = 0;
- s.bitbuf = 0;
- s.bitcnt = 0;
-
- /* initialize output state */
- s.outfun = outfun;
- s.outhow = outhow;
- s.next = 0;
- s.first = 1;
-
- /* return if bits() or decode() tries to read past available input */
- if (setjmp(s.env) != 0) /* if came back here via longjmp(), */
- err = 2; /* then skip decomp(), return error */
- else
- err = decomp(&s); /* decompress */
-
- /* write any leftover output and update the error code if needed */
- if (err != 1 && s.next && s.outfun(s.outhow, s.out, s.next) && err == 0)
- err = 1;
- return err;
-}
-
-#ifdef TEST
-/* Example of how to use blast() */
-#include <stdio.h>
-#include <stdlib.h>
-
-#define CHUNK 16384
-
-local unsigned inf(void *how, unsigned char **buf)
-{
- static unsigned char hold[CHUNK];
-
- *buf = hold;
- return fread(hold, 1, CHUNK, (FILE *)how);
-}
-
-local int outf(void *how, unsigned char *buf, unsigned len)
-{
- return fwrite(buf, 1, len, (FILE *)how) != len;
-}
-
-/* Decompress a PKWare Compression Library stream from stdin to stdout */
-int main(void)
-{
- int ret, n;
-
- /* decompress to stdout */
- ret = blast(inf, stdin, outf, stdout);
- if (ret != 0) fprintf(stderr, "blast error: %d\n", ret);
-
- /* see if there are any leftover bytes */
- n = 0;
- while (getchar() != EOF) n++;
- if (n) fprintf(stderr, "blast warning: %d unused bytes of input\n", n);
-
- /* return blast() error code */
- return ret;
-}
-#endif
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/blast/blast.h
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/blast/blast.h b/c++/libs/zlib-1.2.8/contrib/blast/blast.h
deleted file mode 100644
index 658cfd3..0000000
--- a/c++/libs/zlib-1.2.8/contrib/blast/blast.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* blast.h -- interface for blast.c
- Copyright (C) 2003, 2012 Mark Adler
- version 1.2, 24 Oct 2012
-
- This software is provided 'as-is', without any express or implied
- warranty. In no event will the author be held liable for any damages
- arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source distribution.
-
- Mark Adler madler@alumni.caltech.edu
- */
-
-
-/*
- * blast() decompresses the PKWare Data Compression Library (DCL) compressed
- * format. It provides the same functionality as the explode() function in
- * that library. (Note: PKWare overused the "implode" verb, and the format
- * used by their library implode() function is completely different and
- * incompatible with the implode compression method supported by PKZIP.)
- *
- * The binary mode for stdio functions should be used to assure that the
- * compressed data is not corrupted when read or written. For example:
- * fopen(..., "rb") and fopen(..., "wb").
- */
-
-
-typedef unsigned (*blast_in)(void *how, unsigned char **buf);
-typedef int (*blast_out)(void *how, unsigned char *buf, unsigned len);
-/* Definitions for input/output functions passed to blast(). See below for
- * what the provided functions need to do.
- */
-
-
-int blast(blast_in infun, void *inhow, blast_out outfun, void *outhow);
-/* Decompress input to output using the provided infun() and outfun() calls.
- * On success, the return value of blast() is zero. If there is an error in
- * the source data, i.e. it is not in the proper format, then a negative value
- * is returned. If there is not enough input available or there is not enough
- * output space, then a positive error is returned.
- *
- * The input function is invoked: len = infun(how, &buf), where buf is set by
- * infun() to point to the input buffer, and infun() returns the number of
- * available bytes there. If infun() returns zero, then blast() returns with
- * an input error. (blast() only asks for input if it needs it.) inhow is for
- * use by the application to pass an input descriptor to infun(), if desired.
- *
- * The output function is invoked: err = outfun(how, buf, len), where the bytes
- * to be written are buf[0..len-1]. If err is not zero, then blast() returns
- * with an output error. outfun() is always called with len <= 4096. outhow
- * is for use by the application to pass an output descriptor to outfun(), if
- * desired.
- *
- * The return codes are:
- *
- * 2: ran out of input before completing decompression
- * 1: output error before completing decompression
- * 0: successful decompression
- * -1: literal flag not zero or one
- * -2: dictionary size not in 4..6
- * -3: distance is too far back
- *
- * At the bottom of blast.c is an example program that uses blast() that can be
- * compiled to produce a command-line decompression filter by defining TEST.
- */
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/blast/test.txt
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/blast/test.txt b/c++/libs/zlib-1.2.8/contrib/blast/test.txt
deleted file mode 100644
index bfdf1c5..0000000
--- a/c++/libs/zlib-1.2.8/contrib/blast/test.txt
+++ /dev/null
@@ -1 +0,0 @@
-AIAIAIAIAIAIA
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/delphi/ZLib.pas
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/delphi/ZLib.pas b/c++/libs/zlib-1.2.8/contrib/delphi/ZLib.pas
deleted file mode 100644
index a579974..0000000
--- a/c++/libs/zlib-1.2.8/contrib/delphi/ZLib.pas
+++ /dev/null
@@ -1,557 +0,0 @@
-{*******************************************************}
-{ }
-{ Borland Delphi Supplemental Components }
-{ ZLIB Data Compression Interface Unit }
-{ }
-{ Copyright (c) 1997,99 Borland Corporation }
-{ }
-{*******************************************************}
-
-{ Updated for zlib 1.2.x by Cosmin Truta <co...@cs.ubbcluj.ro> }
-
-unit ZLib;
-
-interface
-
-uses SysUtils, Classes;
-
-type
- TAlloc = function (AppData: Pointer; Items, Size: Integer): Pointer; cdecl;
- TFree = procedure (AppData, Block: Pointer); cdecl;
-
- // Internal structure. Ignore.
- TZStreamRec = packed record
- next_in: PChar; // next input byte
- avail_in: Integer; // number of bytes available at next_in
- total_in: Longint; // total nb of input bytes read so far
-
- next_out: PChar; // next output byte should be put here
- avail_out: Integer; // remaining free space at next_out
- total_out: Longint; // total nb of bytes output so far
-
- msg: PChar; // last error message, NULL if no error
- internal: Pointer; // not visible by applications
-
- zalloc: TAlloc; // used to allocate the internal state
- zfree: TFree; // used to free the internal state
- AppData: Pointer; // private data object passed to zalloc and zfree
-
- data_type: Integer; // best guess about the data type: ascii or binary
- adler: Longint; // adler32 value of the uncompressed data
- reserved: Longint; // reserved for future use
- end;
-
- // Abstract ancestor class
- TCustomZlibStream = class(TStream)
- private
- FStrm: TStream;
- FStrmPos: Integer;
- FOnProgress: TNotifyEvent;
- FZRec: TZStreamRec;
- FBuffer: array [Word] of Char;
- protected
- procedure Progress(Sender: TObject); dynamic;
- property OnProgress: TNotifyEvent read FOnProgress write FOnProgress;
- constructor Create(Strm: TStream);
- end;
-
-{ TCompressionStream compresses data on the fly as data is written to it, and
- stores the compressed data to another stream.
-
- TCompressionStream is write-only and strictly sequential. Reading from the
- stream will raise an exception. Using Seek to move the stream pointer
- will raise an exception.
-
- Output data is cached internally, written to the output stream only when
- the internal output buffer is full. All pending output data is flushed
- when the stream is destroyed.
-
- The Position property returns the number of uncompressed bytes of
- data that have been written to the stream so far.
-
- CompressionRate returns the on-the-fly percentage by which the original
- data has been compressed: (1 - (CompressedBytes / UncompressedBytes)) * 100
- If raw data size = 100 and compressed data size = 25, the CompressionRate
- is 75%
-
- The OnProgress event is called each time the output buffer is filled and
- written to the output stream. This is useful for updating a progress
- indicator when you are writing a large chunk of data to the compression
- stream in a single call.}
-
-
- TCompressionLevel = (clNone, clFastest, clDefault, clMax);
-
- TCompressionStream = class(TCustomZlibStream)
- private
- function GetCompressionRate: Single;
- public
- constructor Create(CompressionLevel: TCompressionLevel; Dest: TStream);
- destructor Destroy; override;
- function Read(var Buffer; Count: Longint): Longint; override;
- function Write(const Buffer; Count: Longint): Longint; override;
- function Seek(Offset: Longint; Origin: Word): Longint; override;
- property CompressionRate: Single read GetCompressionRate;
- property OnProgress;
- end;
-
-{ TDecompressionStream decompresses data on the fly as data is read from it.
-
- Compressed data comes from a separate source stream. TDecompressionStream
- is read-only and unidirectional; you can seek forward in the stream, but not
- backwards. The special case of setting the stream position to zero is
- allowed. Seeking forward decompresses data until the requested position in
- the uncompressed data has been reached. Seeking backwards, seeking relative
- to the end of the stream, requesting the size of the stream, and writing to
- the stream will raise an exception.
-
- The Position property returns the number of bytes of uncompressed data that
- have been read from the stream so far.
-
- The OnProgress event is called each time the internal input buffer of
- compressed data is exhausted and the next block is read from the input stream.
- This is useful for updating a progress indicator when you are reading a
- large chunk of data from the decompression stream in a single call.}
-
- TDecompressionStream = class(TCustomZlibStream)
- public
- constructor Create(Source: TStream);
- destructor Destroy; override;
- function Read(var Buffer; Count: Longint): Longint; override;
- function Write(const Buffer; Count: Longint): Longint; override;
- function Seek(Offset: Longint; Origin: Word): Longint; override;
- property OnProgress;
- end;
-
-
-
-{ CompressBuf compresses data, buffer to buffer, in one call.
- In: InBuf = ptr to compressed data
- InBytes = number of bytes in InBuf
- Out: OutBuf = ptr to newly allocated buffer containing decompressed data
- OutBytes = number of bytes in OutBuf }
-procedure CompressBuf(const InBuf: Pointer; InBytes: Integer;
- out OutBuf: Pointer; out OutBytes: Integer);
-
-
-{ DecompressBuf decompresses data, buffer to buffer, in one call.
- In: InBuf = ptr to compressed data
- InBytes = number of bytes in InBuf
- OutEstimate = zero, or est. size of the decompressed data
- Out: OutBuf = ptr to newly allocated buffer containing decompressed data
- OutBytes = number of bytes in OutBuf }
-procedure DecompressBuf(const InBuf: Pointer; InBytes: Integer;
- OutEstimate: Integer; out OutBuf: Pointer; out OutBytes: Integer);
-
-{ DecompressToUserBuf decompresses data, buffer to buffer, in one call.
- In: InBuf = ptr to compressed data
- InBytes = number of bytes in InBuf
- Out: OutBuf = ptr to user-allocated buffer to contain decompressed data
- BufSize = number of bytes in OutBuf }
-procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer;
- const OutBuf: Pointer; BufSize: Integer);
-
-const
- zlib_version = '1.2.8';
-
-type
- EZlibError = class(Exception);
- ECompressionError = class(EZlibError);
- EDecompressionError = class(EZlibError);
-
-implementation
-
-uses ZLibConst;
-
-const
- Z_NO_FLUSH = 0;
- Z_PARTIAL_FLUSH = 1;
- Z_SYNC_FLUSH = 2;
- Z_FULL_FLUSH = 3;
- Z_FINISH = 4;
-
- Z_OK = 0;
- Z_STREAM_END = 1;
- Z_NEED_DICT = 2;
- Z_ERRNO = (-1);
- Z_STREAM_ERROR = (-2);
- Z_DATA_ERROR = (-3);
- Z_MEM_ERROR = (-4);
- Z_BUF_ERROR = (-5);
- Z_VERSION_ERROR = (-6);
-
- Z_NO_COMPRESSION = 0;
- Z_BEST_SPEED = 1;
- Z_BEST_COMPRESSION = 9;
- Z_DEFAULT_COMPRESSION = (-1);
-
- Z_FILTERED = 1;
- Z_HUFFMAN_ONLY = 2;
- Z_RLE = 3;
- Z_DEFAULT_STRATEGY = 0;
-
- Z_BINARY = 0;
- Z_ASCII = 1;
- Z_UNKNOWN = 2;
-
- Z_DEFLATED = 8;
-
-
-{$L adler32.obj}
-{$L compress.obj}
-{$L crc32.obj}
-{$L deflate.obj}
-{$L infback.obj}
-{$L inffast.obj}
-{$L inflate.obj}
-{$L inftrees.obj}
-{$L trees.obj}
-{$L uncompr.obj}
-{$L zutil.obj}
-
-procedure adler32; external;
-procedure compressBound; external;
-procedure crc32; external;
-procedure deflateInit2_; external;
-procedure deflateParams; external;
-
-function _malloc(Size: Integer): Pointer; cdecl;
-begin
- Result := AllocMem(Size);
-end;
-
-procedure _free(Block: Pointer); cdecl;
-begin
- FreeMem(Block);
-end;
-
-procedure _memset(P: Pointer; B: Byte; count: Integer); cdecl;
-begin
- FillChar(P^, count, B);
-end;
-
-procedure _memcpy(dest, source: Pointer; count: Integer); cdecl;
-begin
- Move(source^, dest^, count);
-end;
-
-
-
-// deflate compresses data
-function deflateInit_(var strm: TZStreamRec; level: Integer; version: PChar;
- recsize: Integer): Integer; external;
-function deflate(var strm: TZStreamRec; flush: Integer): Integer; external;
-function deflateEnd(var strm: TZStreamRec): Integer; external;
-
-// inflate decompresses data
-function inflateInit_(var strm: TZStreamRec; version: PChar;
- recsize: Integer): Integer; external;
-function inflate(var strm: TZStreamRec; flush: Integer): Integer; external;
-function inflateEnd(var strm: TZStreamRec): Integer; external;
-function inflateReset(var strm: TZStreamRec): Integer; external;
-
-
-function zlibAllocMem(AppData: Pointer; Items, Size: Integer): Pointer; cdecl;
-begin
-// GetMem(Result, Items*Size);
- Result := AllocMem(Items * Size);
-end;
-
-procedure zlibFreeMem(AppData, Block: Pointer); cdecl;
-begin
- FreeMem(Block);
-end;
-
-{function zlibCheck(code: Integer): Integer;
-begin
- Result := code;
- if code < 0 then
- raise EZlibError.Create('error'); //!!
-end;}
-
-function CCheck(code: Integer): Integer;
-begin
- Result := code;
- if code < 0 then
- raise ECompressionError.Create('error'); //!!
-end;
-
-function DCheck(code: Integer): Integer;
-begin
- Result := code;
- if code < 0 then
- raise EDecompressionError.Create('error'); //!!
-end;
-
-procedure CompressBuf(const InBuf: Pointer; InBytes: Integer;
- out OutBuf: Pointer; out OutBytes: Integer);
-var
- strm: TZStreamRec;
- P: Pointer;
-begin
- FillChar(strm, sizeof(strm), 0);
- strm.zalloc := zlibAllocMem;
- strm.zfree := zlibFreeMem;
- OutBytes := ((InBytes + (InBytes div 10) + 12) + 255) and not 255;
- GetMem(OutBuf, OutBytes);
- try
- strm.next_in := InBuf;
- strm.avail_in := InBytes;
- strm.next_out := OutBuf;
- strm.avail_out := OutBytes;
- CCheck(deflateInit_(strm, Z_BEST_COMPRESSION, zlib_version, sizeof(strm)));
- try
- while CCheck(deflate(strm, Z_FINISH)) <> Z_STREAM_END do
- begin
- P := OutBuf;
- Inc(OutBytes, 256);
- ReallocMem(OutBuf, OutBytes);
- strm.next_out := PChar(Integer(OutBuf) + (Integer(strm.next_out) - Integer(P)));
- strm.avail_out := 256;
- end;
- finally
- CCheck(deflateEnd(strm));
- end;
- ReallocMem(OutBuf, strm.total_out);
- OutBytes := strm.total_out;
- except
- FreeMem(OutBuf);
- raise
- end;
-end;
-
-
-procedure DecompressBuf(const InBuf: Pointer; InBytes: Integer;
- OutEstimate: Integer; out OutBuf: Pointer; out OutBytes: Integer);
-var
- strm: TZStreamRec;
- P: Pointer;
- BufInc: Integer;
-begin
- FillChar(strm, sizeof(strm), 0);
- strm.zalloc := zlibAllocMem;
- strm.zfree := zlibFreeMem;
- BufInc := (InBytes + 255) and not 255;
- if OutEstimate = 0 then
- OutBytes := BufInc
- else
- OutBytes := OutEstimate;
- GetMem(OutBuf, OutBytes);
- try
- strm.next_in := InBuf;
- strm.avail_in := InBytes;
- strm.next_out := OutBuf;
- strm.avail_out := OutBytes;
- DCheck(inflateInit_(strm, zlib_version, sizeof(strm)));
- try
- while DCheck(inflate(strm, Z_NO_FLUSH)) <> Z_STREAM_END do
- begin
- P := OutBuf;
- Inc(OutBytes, BufInc);
- ReallocMem(OutBuf, OutBytes);
- strm.next_out := PChar(Integer(OutBuf) + (Integer(strm.next_out) - Integer(P)));
- strm.avail_out := BufInc;
- end;
- finally
- DCheck(inflateEnd(strm));
- end;
- ReallocMem(OutBuf, strm.total_out);
- OutBytes := strm.total_out;
- except
- FreeMem(OutBuf);
- raise
- end;
-end;
-
-procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer;
- const OutBuf: Pointer; BufSize: Integer);
-var
- strm: TZStreamRec;
-begin
- FillChar(strm, sizeof(strm), 0);
- strm.zalloc := zlibAllocMem;
- strm.zfree := zlibFreeMem;
- strm.next_in := InBuf;
- strm.avail_in := InBytes;
- strm.next_out := OutBuf;
- strm.avail_out := BufSize;
- DCheck(inflateInit_(strm, zlib_version, sizeof(strm)));
- try
- if DCheck(inflate(strm, Z_FINISH)) <> Z_STREAM_END then
- raise EZlibError.CreateRes(@sTargetBufferTooSmall);
- finally
- DCheck(inflateEnd(strm));
- end;
-end;
-
-// TCustomZlibStream
-
-constructor TCustomZLibStream.Create(Strm: TStream);
-begin
- inherited Create;
- FStrm := Strm;
- FStrmPos := Strm.Position;
- FZRec.zalloc := zlibAllocMem;
- FZRec.zfree := zlibFreeMem;
-end;
-
-procedure TCustomZLibStream.Progress(Sender: TObject);
-begin
- if Assigned(FOnProgress) then FOnProgress(Sender);
-end;
-
-
-// TCompressionStream
-
-constructor TCompressionStream.Create(CompressionLevel: TCompressionLevel;
- Dest: TStream);
-const
- Levels: array [TCompressionLevel] of ShortInt =
- (Z_NO_COMPRESSION, Z_BEST_SPEED, Z_DEFAULT_COMPRESSION, Z_BEST_COMPRESSION);
-begin
- inherited Create(Dest);
- FZRec.next_out := FBuffer;
- FZRec.avail_out := sizeof(FBuffer);
- CCheck(deflateInit_(FZRec, Levels[CompressionLevel], zlib_version, sizeof(FZRec)));
-end;
-
-destructor TCompressionStream.Destroy;
-begin
- FZRec.next_in := nil;
- FZRec.avail_in := 0;
- try
- if FStrm.Position <> FStrmPos then FStrm.Position := FStrmPos;
- while (CCheck(deflate(FZRec, Z_FINISH)) <> Z_STREAM_END)
- and (FZRec.avail_out = 0) do
- begin
- FStrm.WriteBuffer(FBuffer, sizeof(FBuffer));
- FZRec.next_out := FBuffer;
- FZRec.avail_out := sizeof(FBuffer);
- end;
- if FZRec.avail_out < sizeof(FBuffer) then
- FStrm.WriteBuffer(FBuffer, sizeof(FBuffer) - FZRec.avail_out);
- finally
- deflateEnd(FZRec);
- end;
- inherited Destroy;
-end;
-
-function TCompressionStream.Read(var Buffer; Count: Longint): Longint;
-begin
- raise ECompressionError.CreateRes(@sInvalidStreamOp);
-end;
-
-function TCompressionStream.Write(const Buffer; Count: Longint): Longint;
-begin
- FZRec.next_in := @Buffer;
- FZRec.avail_in := Count;
- if FStrm.Position <> FStrmPos then FStrm.Position := FStrmPos;
- while (FZRec.avail_in > 0) do
- begin
- CCheck(deflate(FZRec, 0));
- if FZRec.avail_out = 0 then
- begin
- FStrm.WriteBuffer(FBuffer, sizeof(FBuffer));
- FZRec.next_out := FBuffer;
- FZRec.avail_out := sizeof(FBuffer);
- FStrmPos := FStrm.Position;
- Progress(Self);
- end;
- end;
- Result := Count;
-end;
-
-function TCompressionStream.Seek(Offset: Longint; Origin: Word): Longint;
-begin
- if (Offset = 0) and (Origin = soFromCurrent) then
- Result := FZRec.total_in
- else
- raise ECompressionError.CreateRes(@sInvalidStreamOp);
-end;
-
-function TCompressionStream.GetCompressionRate: Single;
-begin
- if FZRec.total_in = 0 then
- Result := 0
- else
- Result := (1.0 - (FZRec.total_out / FZRec.total_in)) * 100.0;
-end;
-
-
-// TDecompressionStream
-
-constructor TDecompressionStream.Create(Source: TStream);
-begin
- inherited Create(Source);
- FZRec.next_in := FBuffer;
- FZRec.avail_in := 0;
- DCheck(inflateInit_(FZRec, zlib_version, sizeof(FZRec)));
-end;
-
-destructor TDecompressionStream.Destroy;
-begin
- FStrm.Seek(-FZRec.avail_in, 1);
- inflateEnd(FZRec);
- inherited Destroy;
-end;
-
-function TDecompressionStream.Read(var Buffer; Count: Longint): Longint;
-begin
- FZRec.next_out := @Buffer;
- FZRec.avail_out := Count;
- if FStrm.Position <> FStrmPos then FStrm.Position := FStrmPos;
- while (FZRec.avail_out > 0) do
- begin
- if FZRec.avail_in = 0 then
- begin
- FZRec.avail_in := FStrm.Read(FBuffer, sizeof(FBuffer));
- if FZRec.avail_in = 0 then
- begin
- Result := Count - FZRec.avail_out;
- Exit;
- end;
- FZRec.next_in := FBuffer;
- FStrmPos := FStrm.Position;
- Progress(Self);
- end;
- CCheck(inflate(FZRec, 0));
- end;
- Result := Count;
-end;
-
-function TDecompressionStream.Write(const Buffer; Count: Longint): Longint;
-begin
- raise EDecompressionError.CreateRes(@sInvalidStreamOp);
-end;
-
-function TDecompressionStream.Seek(Offset: Longint; Origin: Word): Longint;
-var
- I: Integer;
- Buf: array [0..4095] of Char;
-begin
- if (Offset = 0) and (Origin = soFromBeginning) then
- begin
- DCheck(inflateReset(FZRec));
- FZRec.next_in := FBuffer;
- FZRec.avail_in := 0;
- FStrm.Position := 0;
- FStrmPos := 0;
- end
- else if ( (Offset >= 0) and (Origin = soFromCurrent)) or
- ( ((Offset - FZRec.total_out) > 0) and (Origin = soFromBeginning)) then
- begin
- if Origin = soFromBeginning then Dec(Offset, FZRec.total_out);
- if Offset > 0 then
- begin
- for I := 1 to Offset div sizeof(Buf) do
- ReadBuffer(Buf, sizeof(Buf));
- ReadBuffer(Buf, Offset mod sizeof(Buf));
- end;
- end
- else
- raise EDecompressionError.CreateRes(@sInvalidStreamOp);
- Result := FZRec.total_out;
-end;
-
-
-end.
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/delphi/ZLibConst.pas
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/delphi/ZLibConst.pas b/c++/libs/zlib-1.2.8/contrib/delphi/ZLibConst.pas
deleted file mode 100644
index cdfe136..0000000
--- a/c++/libs/zlib-1.2.8/contrib/delphi/ZLibConst.pas
+++ /dev/null
@@ -1,11 +0,0 @@
-unit ZLibConst;
-
-interface
-
-resourcestring
- sTargetBufferTooSmall = 'ZLib error: target buffer may be too small';
- sInvalidStreamOp = 'Invalid stream operation';
-
-implementation
-
-end.
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/delphi/readme.txt
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/delphi/readme.txt b/c++/libs/zlib-1.2.8/contrib/delphi/readme.txt
deleted file mode 100644
index 2dc9a8b..0000000
--- a/c++/libs/zlib-1.2.8/contrib/delphi/readme.txt
+++ /dev/null
@@ -1,76 +0,0 @@
-
-Overview
-========
-
-This directory contains an update to the ZLib interface unit,
-distributed by Borland as a Delphi supplemental component.
-
-The original ZLib unit is Copyright (c) 1997,99 Borland Corp.,
-and is based on zlib version 1.0.4. There are a series of bugs
-and security problems associated with that old zlib version, and
-we recommend the users to update their ZLib unit.
-
-
-Summary of modifications
-========================
-
-- Improved makefile, adapted to zlib version 1.2.1.
-
-- Some field types from TZStreamRec are changed from Integer to
- Longint, for consistency with the zlib.h header, and for 64-bit
- readiness.
-
-- The zlib_version constant is updated.
-
-- The new Z_RLE strategy has its corresponding symbolic constant.
-
-- The allocation and deallocation functions and function types
- (TAlloc, TFree, zlibAllocMem and zlibFreeMem) are now cdecl,
- and _malloc and _free are added as C RTL stubs. As a result,
- the original C sources of zlib can be compiled out of the box,
- and linked to the ZLib unit.
-
-
-Suggestions for improvements
-============================
-
-Currently, the ZLib unit provides only a limited wrapper around
-the zlib library, and much of the original zlib functionality is
-missing. Handling compressed file formats like ZIP/GZIP or PNG
-cannot be implemented without having this functionality.
-Applications that handle these formats are either using their own,
-duplicated code, or not using the ZLib unit at all.
-
-Here are a few suggestions:
-
-- Checksum class wrappers around adler32() and crc32(), similar
- to the Java classes that implement the java.util.zip.Checksum
- interface.
-
-- The ability to read and write raw deflate streams, without the
- zlib stream header and trailer. Raw deflate streams are used
- in the ZIP file format.
-
-- The ability to read and write gzip streams, used in the GZIP
- file format, and normally produced by the gzip program.
-
-- The ability to select a different compression strategy, useful
- to PNG and MNG image compression, and to multimedia compression
- in general. Besides the compression level
-
- TCompressionLevel = (clNone, clFastest, clDefault, clMax);
-
- which, in fact, could have used the 'z' prefix and avoided
- TColor-like symbols
-
- TCompressionLevel = (zcNone, zcFastest, zcDefault, zcMax);
-
- there could be a compression strategy
-
- TCompressionStrategy = (zsDefault, zsFiltered, zsHuffmanOnly, zsRle);
-
-- ZIP and GZIP stream handling via TStreams.
-
-
---
-Cosmin Truta <co...@cs.ubbcluj.ro>
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/delphi/zlibd32.mak
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/delphi/zlibd32.mak b/c++/libs/zlib-1.2.8/contrib/delphi/zlibd32.mak
deleted file mode 100644
index 9bb00b7..0000000
--- a/c++/libs/zlib-1.2.8/contrib/delphi/zlibd32.mak
+++ /dev/null
@@ -1,99 +0,0 @@
-# Makefile for zlib
-# For use with Delphi and C++ Builder under Win32
-# Updated for zlib 1.2.x by Cosmin Truta
-
-# ------------ Borland C++ ------------
-
-# This project uses the Delphi (fastcall/register) calling convention:
-LOC = -DZEXPORT=__fastcall -DZEXPORTVA=__cdecl
-
-CC = bcc32
-LD = bcc32
-AR = tlib
-# do not use "-pr" in CFLAGS
-CFLAGS = -a -d -k- -O2 $(LOC)
-LDFLAGS =
-
-
-# variables
-ZLIB_LIB = zlib.lib
-
-OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj
-OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
-OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj
-OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
-
-
-# targets
-all: $(ZLIB_LIB) example.exe minigzip.exe
-
-.c.obj:
- $(CC) -c $(CFLAGS) $*.c
-
-adler32.obj: adler32.c zlib.h zconf.h
-
-compress.obj: compress.c zlib.h zconf.h
-
-crc32.obj: crc32.c zlib.h zconf.h crc32.h
-
-deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
-
-gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h
-
-gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h
-
-gzread.obj: gzread.c zlib.h zconf.h gzguts.h
-
-gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h
-
-infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h
-
-inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
-
-trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
-
-uncompr.obj: uncompr.c zlib.h zconf.h
-
-zutil.obj: zutil.c zutil.h zlib.h zconf.h
-
-example.obj: test/example.c zlib.h zconf.h
-
-minigzip.obj: test/minigzip.c zlib.h zconf.h
-
-
-# For the sake of the old Borland make,
-# the command line is cut to fit in the MS-DOS 128 byte limit:
-$(ZLIB_LIB): $(OBJ1) $(OBJ2)
- -del $(ZLIB_LIB)
- $(AR) $(ZLIB_LIB) $(OBJP1)
- $(AR) $(ZLIB_LIB) $(OBJP2)
-
-
-# testing
-test: example.exe minigzip.exe
- example
- echo hello world | minigzip | minigzip -d
-
-example.exe: example.obj $(ZLIB_LIB)
- $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
-
-minigzip.exe: minigzip.obj $(ZLIB_LIB)
- $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
-
-
-# cleanup
-clean:
- -del *.obj
- -del *.exe
- -del *.lib
- -del *.tds
- -del zlib.bak
- -del foo.gz
-
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/dotzlib/DotZLib.build
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/dotzlib/DotZLib.build b/c++/libs/zlib-1.2.8/contrib/dotzlib/DotZLib.build
deleted file mode 100644
index e69630c..0000000
--- a/c++/libs/zlib-1.2.8/contrib/dotzlib/DotZLib.build
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<project name="DotZLib" default="build" basedir="./DotZLib">
- <description>A .Net wrapper library around ZLib1.dll</description>
-
- <property name="nunit.location" value="c:/program files/NUnit V2.1/bin" />
- <property name="build.root" value="bin" />
-
- <property name="debug" value="true" />
- <property name="nunit" value="true" />
-
- <property name="build.folder" value="${build.root}/debug/" if="${debug}" />
- <property name="build.folder" value="${build.root}/release/" unless="${debug}" />
-
- <target name="clean" description="Remove all generated files">
- <delete dir="${build.root}" failonerror="false" />
- </target>
-
- <target name="build" description="compiles the source code">
-
- <mkdir dir="${build.folder}" />
- <csc target="library" output="${build.folder}DotZLib.dll" debug="${debug}">
- <references basedir="${nunit.location}">
- <includes if="${nunit}" name="nunit.framework.dll" />
- </references>
- <sources>
- <includes name="*.cs" />
- <excludes name="UnitTests.cs" unless="${nunit}" />
- </sources>
- <arg value="/d:nunit" if="${nunit}" />
- </csc>
- </target>
-
-</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/dotzlib/DotZLib.sln
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/dotzlib/DotZLib.sln b/c++/libs/zlib-1.2.8/contrib/dotzlib/DotZLib.sln
deleted file mode 100644
index 5d533d6..0000000
--- a/c++/libs/zlib-1.2.8/contrib/dotzlib/DotZLib.sln
+++ /dev/null
@@ -1,21 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotZLib", "DotZLib\DotZLib.csproj", "{BB1EE0B1-1808-46CB-B786-949D91117FC5}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Release = Release
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Debug.ActiveCfg = Debug|.NET
- {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Debug.Build.0 = Debug|.NET
- {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Release.ActiveCfg = Release|.NET
- {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Release.Build.0 = Release|.NET
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
-EndGlobal
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/dotzlib/DotZLib/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/dotzlib/DotZLib/AssemblyInfo.cs b/c++/libs/zlib-1.2.8/contrib/dotzlib/DotZLib/AssemblyInfo.cs
deleted file mode 100644
index 724c534..0000000
--- a/c++/libs/zlib-1.2.8/contrib/dotzlib/DotZLib/AssemblyInfo.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-//
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-//
-[assembly: AssemblyTitle("DotZLib")]
-[assembly: AssemblyDescription(".Net bindings for ZLib compression dll 1.2.x")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Henrik Ravn")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("(c) 2004 by Henrik Ravn")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-//
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-
-[assembly: AssemblyVersion("1.0.*")]
-
-//
-// In order to sign your assembly you must specify a key to use. Refer to the
-// Microsoft .NET Framework documentation for more information on assembly signing.
-//
-// Use the attributes below to control which key is used for signing.
-//
-// Notes:
-// (*) If no key is specified, the assembly is not signed.
-// (*) KeyName refers to a key that has been installed in the Crypto Service
-// Provider (CSP) on your machine. KeyFile refers to a file which contains
-// a key.
-// (*) If the KeyFile and the KeyName values are both specified, the
-// following processing occurs:
-// (1) If the KeyName can be found in the CSP, that key is used.
-// (2) If the KeyName does not exist and the KeyFile does exist, the key
-// in the KeyFile is installed into the CSP and used.
-// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
-// When specifying the KeyFile, the location of the KeyFile should be
-// relative to the project output directory which is
-// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
-// located in the project directory, you would specify the AssemblyKeyFile
-// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
-// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
-// documentation for more information on this.
-//
-[assembly: AssemblyDelaySign(false)]
-[assembly: AssemblyKeyFile("")]
-[assembly: AssemblyKeyName("")]
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/dotzlib/DotZLib/ChecksumImpl.cs
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/dotzlib/DotZLib/ChecksumImpl.cs b/c++/libs/zlib-1.2.8/contrib/dotzlib/DotZLib/ChecksumImpl.cs
deleted file mode 100644
index b110dae..0000000
--- a/c++/libs/zlib-1.2.8/contrib/dotzlib/DotZLib/ChecksumImpl.cs
+++ /dev/null
@@ -1,202 +0,0 @@
-//
-// � Copyright Henrik Ravn 2004
-//
-// Use, modification and distribution are subject to the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-using System;
-using System.Runtime.InteropServices;
-using System.Text;
-
-
-namespace DotZLib
-{
- #region ChecksumGeneratorBase
- /// <summary>
- /// Implements the common functionality needed for all <see cref="ChecksumGenerator"/>s
- /// </summary>
- /// <example></example>
- public abstract class ChecksumGeneratorBase : ChecksumGenerator
- {
- /// <summary>
- /// The value of the current checksum
- /// </summary>
- protected uint _current;
-
- /// <summary>
- /// Initializes a new instance of the checksum generator base - the current checksum is
- /// set to zero
- /// </summary>
- public ChecksumGeneratorBase()
- {
- _current = 0;
- }
-
- /// <summary>
- /// Initializes a new instance of the checksum generator basewith a specified value
- /// </summary>
- /// <param name="initialValue">The value to set the current checksum to</param>
- public ChecksumGeneratorBase(uint initialValue)
- {
- _current = initialValue;
- }
-
- /// <summary>
- /// Resets the current checksum to zero
- /// </summary>
- public void Reset() { _current = 0; }
-
- /// <summary>
- /// Gets the current checksum value
- /// </summary>
- public uint Value { get { return _current; } }
-
- /// <summary>
- /// Updates the current checksum with part of an array of bytes
- /// </summary>
- /// <param name="data">The data to update the checksum with</param>
- /// <param name="offset">Where in <c>data</c> to start updating</param>
- /// <param name="count">The number of bytes from <c>data</c> to use</param>
- /// <exception cref="ArgumentException">The sum of offset and count is larger than the length of <c>data</c></exception>
- /// <exception cref="NullReferenceException"><c>data</c> is a null reference</exception>
- /// <exception cref="ArgumentOutOfRangeException">Offset or count is negative.</exception>
- /// <remarks>All the other <c>Update</c> methods are implmeneted in terms of this one.
- /// This is therefore the only method a derived class has to implement</remarks>
- public abstract void Update(byte[] data, int offset, int count);
-
- /// <summary>
- /// Updates the current checksum with an array of bytes.
- /// </summary>
- /// <param name="data">The data to update the checksum with</param>
- public void Update(byte[] data)
- {
- Update(data, 0, data.Length);
- }
-
- /// <summary>
- /// Updates the current checksum with the data from a string
- /// </summary>
- /// <param name="data">The string to update the checksum with</param>
- /// <remarks>The characters in the string are converted by the UTF-8 encoding</remarks>
- public void Update(string data)
- {
- Update(Encoding.UTF8.GetBytes(data));
- }
-
- /// <summary>
- /// Updates the current checksum with the data from a string, using a specific encoding
- /// </summary>
- /// <param name="data">The string to update the checksum with</param>
- /// <param name="encoding">The encoding to use</param>
- public void Update(string data, Encoding encoding)
- {
- Update(encoding.GetBytes(data));
- }
-
- }
- #endregion
-
- #region CRC32
- /// <summary>
- /// Implements a CRC32 checksum generator
- /// </summary>
- public sealed class CRC32Checksum : ChecksumGeneratorBase
- {
- #region DLL imports
-
- [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
- private static extern uint crc32(uint crc, int data, uint length);
-
- #endregion
-
- /// <summary>
- /// Initializes a new instance of the CRC32 checksum generator
- /// </summary>
- public CRC32Checksum() : base() {}
-
- /// <summary>
- /// Initializes a new instance of the CRC32 checksum generator with a specified value
- /// </summary>
- /// <param name="initialValue">The value to set the current checksum to</param>
- public CRC32Checksum(uint initialValue) : base(initialValue) {}
-
- /// <summary>
- /// Updates the current checksum with part of an array of bytes
- /// </summary>
- /// <param name="data">The data to update the checksum with</param>
- /// <param name="offset">Where in <c>data</c> to start updating</param>
- /// <param name="count">The number of bytes from <c>data</c> to use</param>
- /// <exception cref="ArgumentException">The sum of offset and count is larger than the length of <c>data</c></exception>
- /// <exception cref="NullReferenceException"><c>data</c> is a null reference</exception>
- /// <exception cref="ArgumentOutOfRangeException">Offset or count is negative.</exception>
- public override void Update(byte[] data, int offset, int count)
- {
- if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();
- if ((offset+count) > data.Length) throw new ArgumentException();
- GCHandle hData = GCHandle.Alloc(data, GCHandleType.Pinned);
- try
- {
- _current = crc32(_current, hData.AddrOfPinnedObject().ToInt32()+offset, (uint)count);
- }
- finally
- {
- hData.Free();
- }
- }
-
- }
- #endregion
-
- #region Adler
- /// <summary>
- /// Implements a checksum generator that computes the Adler checksum on data
- /// </summary>
- public sealed class AdlerChecksum : ChecksumGeneratorBase
- {
- #region DLL imports
-
- [DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
- private static extern uint adler32(uint adler, int data, uint length);
-
- #endregion
-
- /// <summary>
- /// Initializes a new instance of the Adler checksum generator
- /// </summary>
- public AdlerChecksum() : base() {}
-
- /// <summary>
- /// Initializes a new instance of the Adler checksum generator with a specified value
- /// </summary>
- /// <param name="initialValue">The value to set the current checksum to</param>
- public AdlerChecksum(uint initialValue) : base(initialValue) {}
-
- /// <summary>
- /// Updates the current checksum with part of an array of bytes
- /// </summary>
- /// <param name="data">The data to update the checksum with</param>
- /// <param name="offset">Where in <c>data</c> to start updating</param>
- /// <param name="count">The number of bytes from <c>data</c> to use</param>
- /// <exception cref="ArgumentException">The sum of offset and count is larger than the length of <c>data</c></exception>
- /// <exception cref="NullReferenceException"><c>data</c> is a null reference</exception>
- /// <exception cref="ArgumentOutOfRangeException">Offset or count is negative.</exception>
- public override void Update(byte[] data, int offset, int count)
- {
- if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();
- if ((offset+count) > data.Length) throw new ArgumentException();
- GCHandle hData = GCHandle.Alloc(data, GCHandleType.Pinned);
- try
- {
- _current = adler32(_current, hData.AddrOfPinnedObject().ToInt32()+offset, (uint)count);
- }
- finally
- {
- hData.Free();
- }
- }
-
- }
- #endregion
-
-}
\ No newline at end of file
[07/51] [partial] orc git commit: ORC-204 Update and use CMake
External Project to build C++ compression libraries.
Posted by om...@apache.org.
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/vstudio/vc9/testzlib.vcproj
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/vstudio/vc9/testzlib.vcproj b/c++/libs/zlib-1.2.8/contrib/vstudio/vc9/testzlib.vcproj
deleted file mode 100644
index c9f19d2..0000000
--- a/c++/libs/zlib-1.2.8/contrib/vstudio/vc9/testzlib.vcproj
+++ /dev/null
@@ -1,852 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="testzlib"
- ProjectGUID="{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}"
- RootNamespace="testzlib"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- <Platform
- Name="Itanium"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="x86\TestZlib$(ConfigurationName)"
- IntermediateDirectory="x86\TestZlib$(ConfigurationName)\Tmp"
- ConfigurationType="1"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\.."
- PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
- MinimalRebuild="true"
- BasicRuntimeChecks="0"
- RuntimeLibrary="1"
- BufferSecurityCheck="false"
- UsePrecompiledHeader="0"
- AssemblerOutput="4"
- AssemblerListingLocation="$(IntDir)\"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="..\..\masmx86\match686.obj ..\..\masmx86\inffas32.obj"
- OutputFile="$(OutDir)/testzlib.exe"
- LinkIncremental="2"
- GenerateManifest="false"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="x64\TestZlib$(ConfigurationName)"
- IntermediateDirectory="x64\TestZlib$(ConfigurationName)\Tmp"
- ConfigurationType="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\.."
- PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
- BasicRuntimeChecks="0"
- RuntimeLibrary="3"
- BufferSecurityCheck="false"
- AssemblerListingLocation="$(IntDir)\"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj"
- GenerateManifest="false"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|Itanium"
- OutputDirectory="ia64\TestZlib$(ConfigurationName)"
- IntermediateDirectory="ia64\TestZlib$(ConfigurationName)\Tmp"
- ConfigurationType="1"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="2"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\.."
- PreprocessorDefinitions="ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
- MinimalRebuild="true"
- BasicRuntimeChecks="0"
- RuntimeLibrary="3"
- BufferSecurityCheck="false"
- UsePrecompiledHeader="0"
- AssemblerOutput="4"
- AssemblerListingLocation="$(IntDir)\"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/testzlib.exe"
- LinkIncremental="2"
- GenerateManifest="false"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
- SubSystem="1"
- TargetMachine="5"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="ReleaseWithoutAsm|Win32"
- OutputDirectory="x86\TestZlib$(ConfigurationName)"
- IntermediateDirectory="x86\TestZlib$(ConfigurationName)\Tmp"
- ConfigurationType="1"
- CharacterSet="2"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- OmitFramePointers="true"
- AdditionalIncludeDirectories="..\..\.."
- PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
- StringPooling="true"
- BasicRuntimeChecks="0"
- RuntimeLibrary="0"
- BufferSecurityCheck="false"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- AssemblerListingLocation="$(IntDir)\"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/testzlib.exe"
- LinkIncremental="1"
- GenerateManifest="false"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- OptimizeForWindows98="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="ReleaseWithoutAsm|x64"
- OutputDirectory="x64\TestZlib$(ConfigurationName)"
- IntermediateDirectory="x64\TestZlib$(ConfigurationName)\Tmp"
- ConfigurationType="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\.."
- PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
- BasicRuntimeChecks="0"
- RuntimeLibrary="2"
- BufferSecurityCheck="false"
- AssemblerListingLocation="$(IntDir)\"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies=""
- GenerateManifest="false"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="ReleaseWithoutAsm|Itanium"
- OutputDirectory="ia64\TestZlib$(ConfigurationName)"
- IntermediateDirectory="ia64\TestZlib$(ConfigurationName)\Tmp"
- ConfigurationType="1"
- CharacterSet="2"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="2"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- OmitFramePointers="true"
- AdditionalIncludeDirectories="..\..\.."
- PreprocessorDefinitions="ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
- StringPooling="true"
- BasicRuntimeChecks="0"
- RuntimeLibrary="2"
- BufferSecurityCheck="false"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- AssemblerListingLocation="$(IntDir)\"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/testzlib.exe"
- LinkIncremental="1"
- GenerateManifest="false"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- OptimizeForWindows98="1"
- TargetMachine="5"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="x86\TestZlib$(ConfigurationName)"
- IntermediateDirectory="x86\TestZlib$(ConfigurationName)\Tmp"
- ConfigurationType="1"
- CharacterSet="2"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- OmitFramePointers="true"
- AdditionalIncludeDirectories="..\..\.."
- PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
- StringPooling="true"
- BasicRuntimeChecks="0"
- RuntimeLibrary="0"
- BufferSecurityCheck="false"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- AssemblerListingLocation="$(IntDir)\"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="..\..\masmx86\match686.obj ..\..\masmx86\inffas32.obj"
- OutputFile="$(OutDir)/testzlib.exe"
- LinkIncremental="1"
- GenerateManifest="false"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- OptimizeForWindows98="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="x64\TestZlib$(ConfigurationName)"
- IntermediateDirectory="x64\TestZlib$(ConfigurationName)\Tmp"
- ConfigurationType="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\.."
- PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
- BasicRuntimeChecks="0"
- RuntimeLibrary="0"
- BufferSecurityCheck="false"
- AssemblerListingLocation="$(IntDir)\"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj"
- GenerateManifest="false"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Itanium"
- OutputDirectory="ia64\TestZlib$(ConfigurationName)"
- IntermediateDirectory="ia64\TestZlib$(ConfigurationName)\Tmp"
- ConfigurationType="1"
- CharacterSet="2"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="2"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- OmitFramePointers="true"
- AdditionalIncludeDirectories="..\..\.."
- PreprocessorDefinitions="ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
- StringPooling="true"
- BasicRuntimeChecks="0"
- RuntimeLibrary="2"
- BufferSecurityCheck="false"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- AssemblerListingLocation="$(IntDir)\"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/testzlib.exe"
- LinkIncremental="1"
- GenerateManifest="false"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- OptimizeForWindows98="1"
- TargetMachine="5"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
- >
- <File
- RelativePath="..\..\..\adler32.c"
- >
- </File>
- <File
- RelativePath="..\..\..\compress.c"
- >
- </File>
- <File
- RelativePath="..\..\..\crc32.c"
- >
- </File>
- <File
- RelativePath="..\..\..\deflate.c"
- >
- </File>
- <File
- RelativePath="..\..\..\infback.c"
- >
- </File>
- <File
- RelativePath="..\..\masmx64\inffas8664.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Itanium"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="ReleaseWithoutAsm|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="ReleaseWithoutAsm|Itanium"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Itanium"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\inffast.c"
- >
- </File>
- <File
- RelativePath="..\..\..\inflate.c"
- >
- </File>
- <File
- RelativePath="..\..\..\inftrees.c"
- >
- </File>
- <File
- RelativePath="..\..\testzlib\testzlib.c"
- >
- </File>
- <File
- RelativePath="..\..\..\trees.c"
- >
- </File>
- <File
- RelativePath="..\..\..\uncompr.c"
- >
- </File>
- <File
- RelativePath="..\..\..\zutil.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc"
- >
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/vstudio/vc9/testzlibdll.vcproj
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/vstudio/vc9/testzlibdll.vcproj b/c++/libs/zlib-1.2.8/contrib/vstudio/vc9/testzlibdll.vcproj
deleted file mode 100644
index d7530fd..0000000
--- a/c++/libs/zlib-1.2.8/contrib/vstudio/vc9/testzlibdll.vcproj
+++ /dev/null
@@ -1,565 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="TestZlibDll"
- ProjectGUID="{C52F9E7B-498A-42BE-8DB4-85A15694366A}"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- <Platform
- Name="Itanium"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="x86\TestZlibDll$(ConfigurationName)"
- IntermediateDirectory="x86\TestZlibDll$(ConfigurationName)\Tmp"
- ConfigurationType="1"
- InheritedPropertySheets="UpgradeFromVC70.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..;..\..\minizip"
- PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="0"
- RuntimeLibrary="1"
- BufferSecurityCheck="false"
- UsePrecompiledHeader="0"
- AssemblerListingLocation="$(IntDir)\"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="x86\ZlibDllDebug\zlibwapi.lib"
- OutputFile="$(OutDir)/testzlib.exe"
- LinkIncremental="2"
- GenerateManifest="false"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="x86\TestZlibDll$(ConfigurationName)"
- IntermediateDirectory="x86\TestZlibDll$(ConfigurationName)\Tmp"
- ConfigurationType="1"
- InheritedPropertySheets="UpgradeFromVC70.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- OmitFramePointers="true"
- AdditionalIncludeDirectories="..\..\..;..\..\minizip"
- PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE"
- StringPooling="true"
- BasicRuntimeChecks="0"
- RuntimeLibrary="0"
- BufferSecurityCheck="false"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- AssemblerListingLocation="$(IntDir)\"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="x86\ZlibDllRelease\zlibwapi.lib"
- OutputFile="$(OutDir)/testzlib.exe"
- LinkIncremental="1"
- GenerateManifest="false"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- OptimizeForWindows98="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="x64\TestZlibDll$(ConfigurationName)"
- IntermediateDirectory="x64\TestZlibDll$(ConfigurationName)\Tmp"
- ConfigurationType="1"
- InheritedPropertySheets="UpgradeFromVC70.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..;..\..\minizip"
- PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
- MinimalRebuild="true"
- BasicRuntimeChecks="0"
- RuntimeLibrary="3"
- BufferSecurityCheck="false"
- UsePrecompiledHeader="0"
- AssemblerListingLocation="$(IntDir)\"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="x64\ZlibDllDebug\zlibwapi.lib"
- OutputFile="$(OutDir)/testzlib.exe"
- LinkIncremental="2"
- GenerateManifest="false"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
- SubSystem="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|Itanium"
- OutputDirectory="ia64\TestZlibDll$(ConfigurationName)"
- IntermediateDirectory="ia64\TestZlibDll$(ConfigurationName)\Tmp"
- ConfigurationType="1"
- InheritedPropertySheets="UpgradeFromVC70.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="2"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..;..\..\minizip"
- PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
- MinimalRebuild="true"
- BasicRuntimeChecks="0"
- RuntimeLibrary="3"
- BufferSecurityCheck="false"
- UsePrecompiledHeader="0"
- AssemblerListingLocation="$(IntDir)\"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ia64\ZlibDllDebug\zlibwapi.lib"
- OutputFile="$(OutDir)/testzlib.exe"
- LinkIncremental="2"
- GenerateManifest="false"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
- SubSystem="1"
- TargetMachine="5"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="x64\TestZlibDll$(ConfigurationName)"
- IntermediateDirectory="x64\TestZlibDll$(ConfigurationName)\Tmp"
- ConfigurationType="1"
- InheritedPropertySheets="UpgradeFromVC70.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- OmitFramePointers="true"
- AdditionalIncludeDirectories="..\..\..;..\..\minizip"
- PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
- StringPooling="true"
- BasicRuntimeChecks="0"
- RuntimeLibrary="2"
- BufferSecurityCheck="false"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- AssemblerListingLocation="$(IntDir)\"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="x64\ZlibDllRelease\zlibwapi.lib"
- OutputFile="$(OutDir)/testzlib.exe"
- LinkIncremental="1"
- GenerateManifest="false"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- OptimizeForWindows98="1"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Itanium"
- OutputDirectory="ia64\TestZlibDll$(ConfigurationName)"
- IntermediateDirectory="ia64\TestZlibDll$(ConfigurationName)\Tmp"
- ConfigurationType="1"
- InheritedPropertySheets="UpgradeFromVC70.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="2"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- OmitFramePointers="true"
- AdditionalIncludeDirectories="..\..\..;..\..\minizip"
- PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
- StringPooling="true"
- BasicRuntimeChecks="0"
- RuntimeLibrary="2"
- BufferSecurityCheck="false"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- AssemblerListingLocation="$(IntDir)\"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ia64\ZlibDllRelease\zlibwapi.lib"
- OutputFile="$(OutDir)/testzlib.exe"
- LinkIncremental="1"
- GenerateManifest="false"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- OptimizeForWindows98="1"
- TargetMachine="5"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
- >
- <File
- RelativePath="..\..\testzlib\testzlib.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc"
- >
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/vstudio/vc9/zlib.rc
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/vstudio/vc9/zlib.rc b/c++/libs/zlib-1.2.8/contrib/vstudio/vc9/zlib.rc
deleted file mode 100644
index d42f191..0000000
--- a/c++/libs/zlib-1.2.8/contrib/vstudio/vc9/zlib.rc
+++ /dev/null
@@ -1,32 +0,0 @@
-#include <windows.h>
-
-#define IDR_VERSION1 1
-IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
- FILEVERSION 1,2,8,0
- PRODUCTVERSION 1,2,8,0
- FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
- FILEFLAGS 0
- FILEOS VOS_DOS_WINDOWS32
- FILETYPE VFT_DLL
- FILESUBTYPE 0 // not used
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904E4"
- //language ID = U.S. English, char set = Windows, Multilingual
-
- BEGIN
- VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
- VALUE "FileVersion", "1.2.8\0"
- VALUE "InternalName", "zlib\0"
- VALUE "OriginalFilename", "zlibwapi.dll\0"
- VALUE "ProductName", "ZLib.DLL\0"
- VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
- VALUE "LegalCopyright", "(C) 1995-2013 Jean-loup Gailly & Mark Adler\0"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x0409, 1252
- END
-END
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/vstudio/vc9/zlibstat.vcproj
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/vstudio/vc9/zlibstat.vcproj b/c++/libs/zlib-1.2.8/contrib/vstudio/vc9/zlibstat.vcproj
deleted file mode 100644
index d4ffb46..0000000
--- a/c++/libs/zlib-1.2.8/contrib/vstudio/vc9/zlibstat.vcproj
+++ /dev/null
@@ -1,835 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="zlibstat"
- ProjectGUID="{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- <Platform
- Name="Itanium"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="x86\ZlibStat$(ConfigurationName)"
- IntermediateDirectory="x86\ZlibStat$(ConfigurationName)\Tmp"
- ConfigurationType="4"
- InheritedPropertySheets="UpgradeFromVC70.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
- PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
- ExceptionHandling="0"
- RuntimeLibrary="1"
- BufferSecurityCheck="false"
- PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
- AssemblerListingLocation="$(IntDir)\"
- ObjectFile="$(IntDir)\"
- ProgramDataBaseFileName="$(OutDir)\"
- WarningLevel="3"
- SuppressStartupBanner="true"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="1"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- Culture="1036"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- AdditionalOptions="/MACHINE:X86 /NODEFAULTLIB"
- OutputFile="$(OutDir)\zlibstat.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="x64\ZlibStat$(ConfigurationName)"
- IntermediateDirectory="x64\ZlibStat$(ConfigurationName)\Tmp"
- ConfigurationType="4"
- InheritedPropertySheets="UpgradeFromVC70.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
- PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
- ExceptionHandling="0"
- RuntimeLibrary="3"
- BufferSecurityCheck="false"
- PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
- AssemblerListingLocation="$(IntDir)\"
- ObjectFile="$(IntDir)\"
- ProgramDataBaseFileName="$(OutDir)\"
- WarningLevel="3"
- SuppressStartupBanner="true"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="1"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- Culture="1036"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- AdditionalOptions="/MACHINE:AMD64 /NODEFAULTLIB"
- OutputFile="$(OutDir)\zlibstat.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|Itanium"
- OutputDirectory="ia64\ZlibStat$(ConfigurationName)"
- IntermediateDirectory="ia64\ZlibStat$(ConfigurationName)\Tmp"
- ConfigurationType="4"
- InheritedPropertySheets="UpgradeFromVC70.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="2"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
- PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
- ExceptionHandling="0"
- RuntimeLibrary="3"
- BufferSecurityCheck="false"
- PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
- AssemblerListingLocation="$(IntDir)\"
- ObjectFile="$(IntDir)\"
- ProgramDataBaseFileName="$(OutDir)\"
- WarningLevel="3"
- SuppressStartupBanner="true"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="1"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- Culture="1036"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- AdditionalOptions="/MACHINE:IA64 /NODEFAULTLIB"
- OutputFile="$(OutDir)\zlibstat.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="x86\ZlibStat$(ConfigurationName)"
- IntermediateDirectory="x86\ZlibStat$(ConfigurationName)\Tmp"
- ConfigurationType="4"
- InheritedPropertySheets="UpgradeFromVC70.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
- PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF"
- StringPooling="true"
- ExceptionHandling="0"
- RuntimeLibrary="0"
- BufferSecurityCheck="false"
- EnableFunctionLevelLinking="true"
- PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
- AssemblerListingLocation="$(IntDir)\"
- ObjectFile="$(IntDir)\"
- ProgramDataBaseFileName="$(OutDir)\"
- WarningLevel="3"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- Culture="1036"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- AdditionalOptions="/MACHINE:X86 /NODEFAULTLIB"
- AdditionalDependencies="..\..\masmx86\match686.obj ..\..\masmx86\inffas32.obj "
- OutputFile="$(OutDir)\zlibstat.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="x64\ZlibStat$(ConfigurationName)"
- IntermediateDirectory="x64\ZlibStat$(ConfigurationName)\Tmp"
- ConfigurationType="4"
- InheritedPropertySheets="UpgradeFromVC70.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
- PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64"
- StringPooling="true"
- ExceptionHandling="0"
- RuntimeLibrary="2"
- BufferSecurityCheck="false"
- EnableFunctionLevelLinking="true"
- PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
- AssemblerListingLocation="$(IntDir)\"
- ObjectFile="$(IntDir)\"
- ProgramDataBaseFileName="$(OutDir)\"
- WarningLevel="3"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- Culture="1036"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- AdditionalOptions="/MACHINE:AMD64 /NODEFAULTLIB"
- AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj "
- OutputFile="$(OutDir)\zlibstat.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Itanium"
- OutputDirectory="ia64\ZlibStat$(ConfigurationName)"
- IntermediateDirectory="ia64\ZlibStat$(ConfigurationName)\Tmp"
- ConfigurationType="4"
- InheritedPropertySheets="UpgradeFromVC70.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="2"
- />
- <Tool
- Name="VCCLCompilerTool"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
- PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
- StringPooling="true"
- ExceptionHandling="0"
- RuntimeLibrary="2"
- BufferSecurityCheck="false"
- EnableFunctionLevelLinking="true"
- PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
- AssemblerListingLocation="$(IntDir)\"
- ObjectFile="$(IntDir)\"
- ProgramDataBaseFileName="$(OutDir)\"
- WarningLevel="3"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- Culture="1036"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- AdditionalOptions="/MACHINE:IA64 /NODEFAULTLIB"
- OutputFile="$(OutDir)\zlibstat.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="ReleaseWithoutAsm|Win32"
- OutputDirectory="x86\ZlibStat$(ConfigurationName)"
- IntermediateDirectory="x86\ZlibStat$(ConfigurationName)\Tmp"
- ConfigurationType="4"
- InheritedPropertySheets="UpgradeFromVC70.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
- PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
- StringPooling="true"
- ExceptionHandling="0"
- RuntimeLibrary="0"
- BufferSecurityCheck="false"
- EnableFunctionLevelLinking="true"
- PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
- AssemblerListingLocation="$(IntDir)\"
- ObjectFile="$(IntDir)\"
- ProgramDataBaseFileName="$(OutDir)\"
- WarningLevel="3"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- Culture="1036"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- AdditionalOptions="/MACHINE:X86 /NODEFAULTLIB"
- OutputFile="$(OutDir)\zlibstat.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="ReleaseWithoutAsm|x64"
- OutputDirectory="x64\ZlibStat$(ConfigurationName)"
- IntermediateDirectory="x64\ZlibStat$(ConfigurationName)\Tmp"
- ConfigurationType="4"
- InheritedPropertySheets="UpgradeFromVC70.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
- PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
- StringPooling="true"
- ExceptionHandling="0"
- RuntimeLibrary="2"
- BufferSecurityCheck="false"
- EnableFunctionLevelLinking="true"
- PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
- AssemblerListingLocation="$(IntDir)\"
- ObjectFile="$(IntDir)\"
- ProgramDataBaseFileName="$(OutDir)\"
- WarningLevel="3"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- Culture="1036"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- AdditionalOptions="/MACHINE:AMD64 /NODEFAULTLIB"
- OutputFile="$(OutDir)\zlibstat.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="ReleaseWithoutAsm|Itanium"
- OutputDirectory="ia64\ZlibStat$(ConfigurationName)"
- IntermediateDirectory="ia64\ZlibStat$(ConfigurationName)\Tmp"
- ConfigurationType="4"
- InheritedPropertySheets="UpgradeFromVC70.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="2"
- />
- <Tool
- Name="VCCLCompilerTool"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
- PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
- StringPooling="true"
- ExceptionHandling="0"
- RuntimeLibrary="2"
- BufferSecurityCheck="false"
- EnableFunctionLevelLinking="true"
- PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
- AssemblerListingLocation="$(IntDir)\"
- ObjectFile="$(IntDir)\"
- ProgramDataBaseFileName="$(OutDir)\"
- WarningLevel="3"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- Culture="1036"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- AdditionalOptions="/MACHINE:IA64 /NODEFAULTLIB"
- OutputFile="$(OutDir)\zlibstat.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="..\..\..\adler32.c"
- >
- </File>
- <File
- RelativePath="..\..\..\compress.c"
- >
- </File>
- <File
- RelativePath="..\..\..\crc32.c"
- >
- </File>
- <File
- RelativePath="..\..\..\deflate.c"
- >
- </File>
- <File
- RelativePath="..\..\..\gzclose.c"
- >
- </File>
- <File
- RelativePath="..\..\..\gzguts.h"
- >
- </File>
- <File
- RelativePath="..\..\..\gzlib.c"
- >
- </File>
- <File
- RelativePath="..\..\..\gzread.c"
- >
- </File>
- <File
- RelativePath="..\..\..\gzwrite.c"
- >
- </File>
- <File
- RelativePath="..\..\..\infback.c"
- >
- </File>
- <File
- RelativePath="..\..\masmx64\inffas8664.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Itanium"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Itanium"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="ReleaseWithoutAsm|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="ReleaseWithoutAsm|Itanium"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\inffast.c"
- >
- </File>
- <File
- RelativePath="..\..\..\inflate.c"
- >
- </File>
- <File
- RelativePath="..\..\..\inftrees.c"
- >
- </File>
- <File
- RelativePath="..\..\minizip\ioapi.c"
- >
- </File>
- <File
- RelativePath="..\..\..\trees.c"
- >
- </File>
- <File
- RelativePath="..\..\..\uncompr.c"
- >
- </File>
- <File
- RelativePath="..\..\minizip\unzip.c"
- >
- </File>
- <File
- RelativePath="..\..\minizip\zip.c"
- >
- </File>
- <File
- RelativePath=".\zlib.rc"
- >
- </File>
- <File
- RelativePath=".\zlibvc.def"
- >
- </File>
- <File
- RelativePath="..\..\..\zutil.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/vstudio/vc9/zlibvc.def
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/vstudio/vc9/zlibvc.def b/c++/libs/zlib-1.2.8/contrib/vstudio/vc9/zlibvc.def
deleted file mode 100644
index 980fed3..0000000
--- a/c++/libs/zlib-1.2.8/contrib/vstudio/vc9/zlibvc.def
+++ /dev/null
@@ -1,143 +0,0 @@
-LIBRARY
-; zlib data compression and ZIP file I/O library
-
-VERSION 1.2.8
-
-EXPORTS
- adler32 @1
- compress @2
- crc32 @3
- deflate @4
- deflateCopy @5
- deflateEnd @6
- deflateInit2_ @7
- deflateInit_ @8
- deflateParams @9
- deflateReset @10
- deflateSetDictionary @11
- gzclose @12
- gzdopen @13
- gzerror @14
- gzflush @15
- gzopen @16
- gzread @17
- gzwrite @18
- inflate @19
- inflateEnd @20
- inflateInit2_ @21
- inflateInit_ @22
- inflateReset @23
- inflateSetDictionary @24
- inflateSync @25
- uncompress @26
- zlibVersion @27
- gzprintf @28
- gzputc @29
- gzgetc @30
- gzseek @31
- gzrewind @32
- gztell @33
- gzeof @34
- gzsetparams @35
- zError @36
- inflateSyncPoint @37
- get_crc_table @38
- compress2 @39
- gzputs @40
- gzgets @41
- inflateCopy @42
- inflateBackInit_ @43
- inflateBack @44
- inflateBackEnd @45
- compressBound @46
- deflateBound @47
- gzclearerr @48
- gzungetc @49
- zlibCompileFlags @50
- deflatePrime @51
- deflatePending @52
-
- unzOpen @61
- unzClose @62
- unzGetGlobalInfo @63
- unzGetCurrentFileInfo @64
- unzGoToFirstFile @65
- unzGoToNextFile @66
- unzOpenCurrentFile @67
- unzReadCurrentFile @68
- unzOpenCurrentFile3 @69
- unztell @70
- unzeof @71
- unzCloseCurrentFile @72
- unzGetGlobalComment @73
- unzStringFileNameCompare @74
- unzLocateFile @75
- unzGetLocalExtrafield @76
- unzOpen2 @77
- unzOpenCurrentFile2 @78
- unzOpenCurrentFilePassword @79
-
- zipOpen @80
- zipOpenNewFileInZip @81
- zipWriteInFileInZip @82
- zipCloseFileInZip @83
- zipClose @84
- zipOpenNewFileInZip2 @86
- zipCloseFileInZipRaw @87
- zipOpen2 @88
- zipOpenNewFileInZip3 @89
-
- unzGetFilePos @100
- unzGoToFilePos @101
-
- fill_win32_filefunc @110
-
-; zlibwapi v1.2.4 added:
- fill_win32_filefunc64 @111
- fill_win32_filefunc64A @112
- fill_win32_filefunc64W @113
-
- unzOpen64 @120
- unzOpen2_64 @121
- unzGetGlobalInfo64 @122
- unzGetCurrentFileInfo64 @124
- unzGetCurrentFileZStreamPos64 @125
- unztell64 @126
- unzGetFilePos64 @127
- unzGoToFilePos64 @128
-
- zipOpen64 @130
- zipOpen2_64 @131
- zipOpenNewFileInZip64 @132
- zipOpenNewFileInZip2_64 @133
- zipOpenNewFileInZip3_64 @134
- zipOpenNewFileInZip4_64 @135
- zipCloseFileInZipRaw64 @136
-
-; zlib1 v1.2.4 added:
- adler32_combine @140
- crc32_combine @142
- deflateSetHeader @144
- deflateTune @145
- gzbuffer @146
- gzclose_r @147
- gzclose_w @148
- gzdirect @149
- gzoffset @150
- inflateGetHeader @156
- inflateMark @157
- inflatePrime @158
- inflateReset2 @159
- inflateUndermine @160
-
-; zlib1 v1.2.6 added:
- gzgetc_ @161
- inflateResetKeep @163
- deflateResetKeep @164
-
-; zlib1 v1.2.7 added:
- gzopen_w @165
-
-; zlib1 v1.2.8 added:
- inflateGetDictionary @166
- gzvprintf @167
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/vstudio/vc9/zlibvc.sln
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/vstudio/vc9/zlibvc.sln b/c++/libs/zlib-1.2.8/contrib/vstudio/vc9/zlibvc.sln
deleted file mode 100644
index 75c64c3..0000000
--- a/c++/libs/zlib-1.2.8/contrib/vstudio/vc9/zlibvc.sln
+++ /dev/null
@@ -1,144 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestZlibDll", "testzlibdll.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}"
- ProjectSection(ProjectDependencies) = postProject
- {8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}"
- ProjectSection(ProjectDependencies) = postProject
- {8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}"
- ProjectSection(ProjectDependencies) = postProject
- {8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D}
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Itanium = Debug|Itanium
- Debug|Win32 = Debug|Win32
- Debug|x64 = Debug|x64
- Release|Itanium = Release|Itanium
- Release|Win32 = Release|Win32
- Release|x64 = Release|x64
- ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium
- ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32
- ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Itanium
- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.Build.0 = Debug|Itanium
- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32
- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32
- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64
- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64
- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Itanium
- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.Build.0 = Release|Itanium
- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32
- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32
- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64
- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64
- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium
- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium
- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32
- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32
- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64
- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64
- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Itanium
- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.Build.0 = Debug|Itanium
- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32
- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32
- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64
- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64
- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Itanium
- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.Build.0 = Release|Itanium
- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32
- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32
- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64
- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64
- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium
- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium
- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32
- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32
- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64
- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64
- {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium
- {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium
- {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32
- {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32
- {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64
- {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64
- {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium
- {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium
- {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32
- {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32
- {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64
- {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64
- {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium
- {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium
- {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32
- {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32
- {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64
- {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64
- {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Itanium
- {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.Build.0 = Debug|Itanium
- {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32
- {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32
- {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64
- {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64
- {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Itanium
- {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.Build.0 = Release|Itanium
- {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32
- {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32
- {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64
- {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64
- {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium
- {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium
- {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32
- {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64
- {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium
- {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium
- {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32
- {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32
- {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64
- {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64
- {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium
- {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium
- {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32
- {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32
- {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64
- {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64
- {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium
- {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium
- {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32
- {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64
- {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Itanium
- {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.Build.0 = Debug|Itanium
- {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32
- {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32
- {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64
- {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64
- {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Itanium
- {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.Build.0 = Release|Itanium
- {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32
- {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32
- {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64
- {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64
- {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium
- {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium
- {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32
- {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
[18/51] [partial] orc git commit: ORC-204 Update and use CMake
External Project to build C++ compression libraries.
Posted by om...@apache.org.
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/masmx64/readme.txt
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/masmx64/readme.txt b/c++/libs/zlib-1.2.8/contrib/masmx64/readme.txt
deleted file mode 100644
index 652571c..0000000
--- a/c++/libs/zlib-1.2.8/contrib/masmx64/readme.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-Summary
--------
-This directory contains ASM implementations of the functions
-longest_match() and inflate_fast(), for 64 bits x86 (both AMD64 and Intel EM64t),
-for use with Microsoft Macro Assembler (x64) for AMD64 and Microsoft C++ 64 bits.
-
-gvmat64.asm is written by Gilles Vollant (2005), by using Brian Raiter 686/32 bits
- assembly optimized version from Jean-loup Gailly original longest_match function
-
-inffasx64.asm and inffas8664.c were written by Chris Anderson, by optimizing
- original function from Mark Adler
-
-Use instructions
-----------------
-Assemble the .asm files using MASM and put the object files into the zlib source
-directory. You can also get object files here:
-
- http://www.winimage.com/zLibDll/zlib124_masm_obj.zip
-
-define ASMV and ASMINF in your project. Include inffas8664.c in your source tree,
-and inffasx64.obj and gvmat64.obj as object to link.
-
-
-Build instructions
-------------------
-run bld_64.bat with Microsoft Macro Assembler (x64) for AMD64 (ml64.exe)
-
-ml64.exe is given with Visual Studio 2005, Windows 2003 server DDK
-
-You can get Windows 2003 server DDK with ml64 and cl for AMD64 from
- http://www.microsoft.com/whdc/devtools/ddk/default.mspx for low price)
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/masmx86/bld_ml32.bat
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/masmx86/bld_ml32.bat b/c++/libs/zlib-1.2.8/contrib/masmx86/bld_ml32.bat
deleted file mode 100644
index fcf5755..0000000
--- a/c++/libs/zlib-1.2.8/contrib/masmx86/bld_ml32.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-ml /coff /Zi /c /Flmatch686.lst match686.asm
-ml /coff /Zi /c /Flinffas32.lst inffas32.asm
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/masmx86/inffas32.asm
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/masmx86/inffas32.asm b/c++/libs/zlib-1.2.8/contrib/masmx86/inffas32.asm
deleted file mode 100644
index cb37a81..0000000
--- a/c++/libs/zlib-1.2.8/contrib/masmx86/inffas32.asm
+++ /dev/null
@@ -1,1080 +0,0 @@
-;/* inffas32.asm is a hand tuned assembler version of inffast.c -- fast decoding
-; *
-; * inffas32.asm is derivated from inffas86.c, with translation of assembly code
-; *
-; * Copyright (C) 1995-2003 Mark Adler
-; * For conditions of distribution and use, see copyright notice in zlib.h
-; *
-; * Copyright (C) 2003 Chris Anderson <ch...@charm.net>
-; * Please use the copyright conditions above.
-; *
-; * Mar-13-2003 -- Most of this is derived from inffast.S which is derived from
-; * the gcc -S output of zlib-1.2.0/inffast.c. Zlib-1.2.0 is in beta release at
-; * the moment. I have successfully compiled and tested this code with gcc2.96,
-; * gcc3.2, icc5.0, msvc6.0. It is very close to the speed of inffast.S
-; * compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX
-; * enabled. I will attempt to merge the MMX code into this version. Newer
-; * versions of this and inffast.S can be found at
-; * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/
-; *
-; * 2005 : modification by Gilles Vollant
-; */
-; For Visual C++ 4.x and higher and ML 6.x and higher
-; ml.exe is in directory \MASM611C of Win95 DDK
-; ml.exe is also distributed in http://www.masm32.com/masmdl.htm
-; and in VC++2003 toolkit at http://msdn.microsoft.com/visualc/vctoolkit2003/
-;
-;
-; compile with command line option
-; ml /coff /Zi /c /Flinffas32.lst inffas32.asm
-
-; if you define NO_GZIP (see inflate.h), compile with
-; ml /coff /Zi /c /Flinffas32.lst /DNO_GUNZIP inffas32.asm
-
-
-; zlib122sup is 0 fort zlib 1.2.2.1 and lower
-; zlib122sup is 8 fort zlib 1.2.2.2 and more (with addition of dmax and head
-; in inflate_state in inflate.h)
-zlib1222sup equ 8
-
-
-IFDEF GUNZIP
- INFLATE_MODE_TYPE equ 11
- INFLATE_MODE_BAD equ 26
-ELSE
- IFNDEF NO_GUNZIP
- INFLATE_MODE_TYPE equ 11
- INFLATE_MODE_BAD equ 26
- ELSE
- INFLATE_MODE_TYPE equ 3
- INFLATE_MODE_BAD equ 17
- ENDIF
-ENDIF
-
-
-; 75 "inffast.S"
-;FILE "inffast.S"
-
-;;;GLOBAL _inflate_fast
-
-;;;SECTION .text
-
-
-
- .586p
- .mmx
-
- name inflate_fast_x86
- .MODEL FLAT
-
-_DATA segment
-inflate_fast_use_mmx:
- dd 1
-
-
-_TEXT segment
-
-
-
-ALIGN 4
- db 'Fast decoding Code from Chris Anderson'
- db 0
-
-ALIGN 4
-invalid_literal_length_code_msg:
- db 'invalid literal/length code'
- db 0
-
-ALIGN 4
-invalid_distance_code_msg:
- db 'invalid distance code'
- db 0
-
-ALIGN 4
-invalid_distance_too_far_msg:
- db 'invalid distance too far back'
- db 0
-
-
-ALIGN 4
-inflate_fast_mask:
-dd 0
-dd 1
-dd 3
-dd 7
-dd 15
-dd 31
-dd 63
-dd 127
-dd 255
-dd 511
-dd 1023
-dd 2047
-dd 4095
-dd 8191
-dd 16383
-dd 32767
-dd 65535
-dd 131071
-dd 262143
-dd 524287
-dd 1048575
-dd 2097151
-dd 4194303
-dd 8388607
-dd 16777215
-dd 33554431
-dd 67108863
-dd 134217727
-dd 268435455
-dd 536870911
-dd 1073741823
-dd 2147483647
-dd 4294967295
-
-
-mode_state equ 0 ;/* state->mode */
-wsize_state equ (32+zlib1222sup) ;/* state->wsize */
-write_state equ (36+4+zlib1222sup) ;/* state->write */
-window_state equ (40+4+zlib1222sup) ;/* state->window */
-hold_state equ (44+4+zlib1222sup) ;/* state->hold */
-bits_state equ (48+4+zlib1222sup) ;/* state->bits */
-lencode_state equ (64+4+zlib1222sup) ;/* state->lencode */
-distcode_state equ (68+4+zlib1222sup) ;/* state->distcode */
-lenbits_state equ (72+4+zlib1222sup) ;/* state->lenbits */
-distbits_state equ (76+4+zlib1222sup) ;/* state->distbits */
-
-
-;;SECTION .text
-; 205 "inffast.S"
-;GLOBAL inflate_fast_use_mmx
-
-;SECTION .data
-
-
-; GLOBAL inflate_fast_use_mmx:object
-;.size inflate_fast_use_mmx, 4
-; 226 "inffast.S"
-;SECTION .text
-
-ALIGN 4
-_inflate_fast proc near
-.FPO (16, 4, 0, 0, 1, 0)
- push edi
- push esi
- push ebp
- push ebx
- pushfd
- sub esp,64
- cld
-
-
-
-
- mov esi, [esp+88]
- mov edi, [esi+28]
-
-
-
-
-
-
-
- mov edx, [esi+4]
- mov eax, [esi+0]
-
- add edx,eax
- sub edx,11
-
- mov [esp+44],eax
- mov [esp+20],edx
-
- mov ebp, [esp+92]
- mov ecx, [esi+16]
- mov ebx, [esi+12]
-
- sub ebp,ecx
- neg ebp
- add ebp,ebx
-
- sub ecx,257
- add ecx,ebx
-
- mov [esp+60],ebx
- mov [esp+40],ebp
- mov [esp+16],ecx
-; 285 "inffast.S"
- mov eax, [edi+lencode_state]
- mov ecx, [edi+distcode_state]
-
- mov [esp+8],eax
- mov [esp+12],ecx
-
- mov eax,1
- mov ecx, [edi+lenbits_state]
- shl eax,cl
- dec eax
- mov [esp+0],eax
-
- mov eax,1
- mov ecx, [edi+distbits_state]
- shl eax,cl
- dec eax
- mov [esp+4],eax
-
- mov eax, [edi+wsize_state]
- mov ecx, [edi+write_state]
- mov edx, [edi+window_state]
-
- mov [esp+52],eax
- mov [esp+48],ecx
- mov [esp+56],edx
-
- mov ebp, [edi+hold_state]
- mov ebx, [edi+bits_state]
-; 321 "inffast.S"
- mov esi, [esp+44]
- mov ecx, [esp+20]
- cmp ecx,esi
- ja L_align_long
-
- add ecx,11
- sub ecx,esi
- mov eax,12
- sub eax,ecx
- lea edi, [esp+28]
- rep movsb
- mov ecx,eax
- xor eax,eax
- rep stosb
- lea esi, [esp+28]
- mov [esp+20],esi
- jmp L_is_aligned
-
-
-L_align_long:
- test esi,3
- jz L_is_aligned
- xor eax,eax
- mov al, [esi]
- inc esi
- mov ecx,ebx
- add ebx,8
- shl eax,cl
- or ebp,eax
- jmp L_align_long
-
-L_is_aligned:
- mov edi, [esp+60]
-; 366 "inffast.S"
-L_check_mmx:
- cmp dword ptr [inflate_fast_use_mmx],2
- je L_init_mmx
- ja L_do_loop
-
- push eax
- push ebx
- push ecx
- push edx
- pushfd
- mov eax, [esp]
- xor dword ptr [esp],0200000h
-
-
-
-
- popfd
- pushfd
- pop edx
- xor edx,eax
- jz L_dont_use_mmx
- xor eax,eax
- cpuid
- cmp ebx,0756e6547h
- jne L_dont_use_mmx
- cmp ecx,06c65746eh
- jne L_dont_use_mmx
- cmp edx,049656e69h
- jne L_dont_use_mmx
- mov eax,1
- cpuid
- shr eax,8
- and eax,15
- cmp eax,6
- jne L_dont_use_mmx
- test edx,0800000h
- jnz L_use_mmx
- jmp L_dont_use_mmx
-L_use_mmx:
- mov dword ptr [inflate_fast_use_mmx],2
- jmp L_check_mmx_pop
-L_dont_use_mmx:
- mov dword ptr [inflate_fast_use_mmx],3
-L_check_mmx_pop:
- pop edx
- pop ecx
- pop ebx
- pop eax
- jmp L_check_mmx
-; 426 "inffast.S"
-ALIGN 4
-L_do_loop:
-; 437 "inffast.S"
- cmp bl,15
- ja L_get_length_code
-
- xor eax,eax
- lodsw
- mov cl,bl
- add bl,16
- shl eax,cl
- or ebp,eax
-
-L_get_length_code:
- mov edx, [esp+0]
- mov ecx, [esp+8]
- and edx,ebp
- mov eax, [ecx+edx*4]
-
-L_dolen:
-
-
-
-
-
-
- mov cl,ah
- sub bl,ah
- shr ebp,cl
-
-
-
-
-
-
- test al,al
- jnz L_test_for_length_base
-
- shr eax,16
- stosb
-
-L_while_test:
-
-
- cmp [esp+16],edi
- jbe L_break_loop
-
- cmp [esp+20],esi
- ja L_do_loop
- jmp L_break_loop
-
-L_test_for_length_base:
-; 502 "inffast.S"
- mov edx,eax
- shr edx,16
- mov cl,al
-
- test al,16
- jz L_test_for_second_level_length
- and cl,15
- jz L_save_len
- cmp bl,cl
- jae L_add_bits_to_len
-
- mov ch,cl
- xor eax,eax
- lodsw
- mov cl,bl
- add bl,16
- shl eax,cl
- or ebp,eax
- mov cl,ch
-
-L_add_bits_to_len:
- mov eax,1
- shl eax,cl
- dec eax
- sub bl,cl
- and eax,ebp
- shr ebp,cl
- add edx,eax
-
-L_save_len:
- mov [esp+24],edx
-
-
-L_decode_distance:
-; 549 "inffast.S"
- cmp bl,15
- ja L_get_distance_code
-
- xor eax,eax
- lodsw
- mov cl,bl
- add bl,16
- shl eax,cl
- or ebp,eax
-
-L_get_distance_code:
- mov edx, [esp+4]
- mov ecx, [esp+12]
- and edx,ebp
- mov eax, [ecx+edx*4]
-
-
-L_dodist:
- mov edx,eax
- shr edx,16
- mov cl,ah
- sub bl,ah
- shr ebp,cl
-; 584 "inffast.S"
- mov cl,al
-
- test al,16
- jz L_test_for_second_level_dist
- and cl,15
- jz L_check_dist_one
- cmp bl,cl
- jae L_add_bits_to_dist
-
- mov ch,cl
- xor eax,eax
- lodsw
- mov cl,bl
- add bl,16
- shl eax,cl
- or ebp,eax
- mov cl,ch
-
-L_add_bits_to_dist:
- mov eax,1
- shl eax,cl
- dec eax
- sub bl,cl
- and eax,ebp
- shr ebp,cl
- add edx,eax
- jmp L_check_window
-
-L_check_window:
-; 625 "inffast.S"
- mov [esp+44],esi
- mov eax,edi
- sub eax, [esp+40]
-
- cmp eax,edx
- jb L_clip_window
-
- mov ecx, [esp+24]
- mov esi,edi
- sub esi,edx
-
- sub ecx,3
- mov al, [esi]
- mov [edi],al
- mov al, [esi+1]
- mov dl, [esi+2]
- add esi,3
- mov [edi+1],al
- mov [edi+2],dl
- add edi,3
- rep movsb
-
- mov esi, [esp+44]
- jmp L_while_test
-
-ALIGN 4
-L_check_dist_one:
- cmp edx,1
- jne L_check_window
- cmp [esp+40],edi
- je L_check_window
-
- dec edi
- mov ecx, [esp+24]
- mov al, [edi]
- sub ecx,3
-
- mov [edi+1],al
- mov [edi+2],al
- mov [edi+3],al
- add edi,4
- rep stosb
-
- jmp L_while_test
-
-ALIGN 4
-L_test_for_second_level_length:
-
-
-
-
- test al,64
- jnz L_test_for_end_of_block
-
- mov eax,1
- shl eax,cl
- dec eax
- and eax,ebp
- add eax,edx
- mov edx, [esp+8]
- mov eax, [edx+eax*4]
- jmp L_dolen
-
-ALIGN 4
-L_test_for_second_level_dist:
-
-
-
-
- test al,64
- jnz L_invalid_distance_code
-
- mov eax,1
- shl eax,cl
- dec eax
- and eax,ebp
- add eax,edx
- mov edx, [esp+12]
- mov eax, [edx+eax*4]
- jmp L_dodist
-
-ALIGN 4
-L_clip_window:
-; 721 "inffast.S"
- mov ecx,eax
- mov eax, [esp+52]
- neg ecx
- mov esi, [esp+56]
-
- cmp eax,edx
- jb L_invalid_distance_too_far
-
- add ecx,edx
- cmp dword ptr [esp+48],0
- jne L_wrap_around_window
-
- sub eax,ecx
- add esi,eax
-; 749 "inffast.S"
- mov eax, [esp+24]
- cmp eax,ecx
- jbe L_do_copy1
-
- sub eax,ecx
- rep movsb
- mov esi,edi
- sub esi,edx
- jmp L_do_copy1
-
- cmp eax,ecx
- jbe L_do_copy1
-
- sub eax,ecx
- rep movsb
- mov esi,edi
- sub esi,edx
- jmp L_do_copy1
-
-L_wrap_around_window:
-; 793 "inffast.S"
- mov eax, [esp+48]
- cmp ecx,eax
- jbe L_contiguous_in_window
-
- add esi, [esp+52]
- add esi,eax
- sub esi,ecx
- sub ecx,eax
-
-
- mov eax, [esp+24]
- cmp eax,ecx
- jbe L_do_copy1
-
- sub eax,ecx
- rep movsb
- mov esi, [esp+56]
- mov ecx, [esp+48]
- cmp eax,ecx
- jbe L_do_copy1
-
- sub eax,ecx
- rep movsb
- mov esi,edi
- sub esi,edx
- jmp L_do_copy1
-
-L_contiguous_in_window:
-; 836 "inffast.S"
- add esi,eax
- sub esi,ecx
-
-
- mov eax, [esp+24]
- cmp eax,ecx
- jbe L_do_copy1
-
- sub eax,ecx
- rep movsb
- mov esi,edi
- sub esi,edx
-
-L_do_copy1:
-; 862 "inffast.S"
- mov ecx,eax
- rep movsb
-
- mov esi, [esp+44]
- jmp L_while_test
-; 878 "inffast.S"
-ALIGN 4
-L_init_mmx:
- emms
-
-
-
-
-
- movd mm0,ebp
- mov ebp,ebx
-; 896 "inffast.S"
- movd mm4,dword ptr [esp+0]
- movq mm3,mm4
- movd mm5,dword ptr [esp+4]
- movq mm2,mm5
- pxor mm1,mm1
- mov ebx, [esp+8]
- jmp L_do_loop_mmx
-
-ALIGN 4
-L_do_loop_mmx:
- psrlq mm0,mm1
-
- cmp ebp,32
- ja L_get_length_code_mmx
-
- movd mm6,ebp
- movd mm7,dword ptr [esi]
- add esi,4
- psllq mm7,mm6
- add ebp,32
- por mm0,mm7
-
-L_get_length_code_mmx:
- pand mm4,mm0
- movd eax,mm4
- movq mm4,mm3
- mov eax, [ebx+eax*4]
-
-L_dolen_mmx:
- movzx ecx,ah
- movd mm1,ecx
- sub ebp,ecx
-
- test al,al
- jnz L_test_for_length_base_mmx
-
- shr eax,16
- stosb
-
-L_while_test_mmx:
-
-
- cmp [esp+16],edi
- jbe L_break_loop
-
- cmp [esp+20],esi
- ja L_do_loop_mmx
- jmp L_break_loop
-
-L_test_for_length_base_mmx:
-
- mov edx,eax
- shr edx,16
-
- test al,16
- jz L_test_for_second_level_length_mmx
- and eax,15
- jz L_decode_distance_mmx
-
- psrlq mm0,mm1
- movd mm1,eax
- movd ecx,mm0
- sub ebp,eax
- and ecx, [inflate_fast_mask+eax*4]
- add edx,ecx
-
-L_decode_distance_mmx:
- psrlq mm0,mm1
-
- cmp ebp,32
- ja L_get_dist_code_mmx
-
- movd mm6,ebp
- movd mm7,dword ptr [esi]
- add esi,4
- psllq mm7,mm6
- add ebp,32
- por mm0,mm7
-
-L_get_dist_code_mmx:
- mov ebx, [esp+12]
- pand mm5,mm0
- movd eax,mm5
- movq mm5,mm2
- mov eax, [ebx+eax*4]
-
-L_dodist_mmx:
-
- movzx ecx,ah
- mov ebx,eax
- shr ebx,16
- sub ebp,ecx
- movd mm1,ecx
-
- test al,16
- jz L_test_for_second_level_dist_mmx
- and eax,15
- jz L_check_dist_one_mmx
-
-L_add_bits_to_dist_mmx:
- psrlq mm0,mm1
- movd mm1,eax
- movd ecx,mm0
- sub ebp,eax
- and ecx, [inflate_fast_mask+eax*4]
- add ebx,ecx
-
-L_check_window_mmx:
- mov [esp+44],esi
- mov eax,edi
- sub eax, [esp+40]
-
- cmp eax,ebx
- jb L_clip_window_mmx
-
- mov ecx,edx
- mov esi,edi
- sub esi,ebx
-
- sub ecx,3
- mov al, [esi]
- mov [edi],al
- mov al, [esi+1]
- mov dl, [esi+2]
- add esi,3
- mov [edi+1],al
- mov [edi+2],dl
- add edi,3
- rep movsb
-
- mov esi, [esp+44]
- mov ebx, [esp+8]
- jmp L_while_test_mmx
-
-ALIGN 4
-L_check_dist_one_mmx:
- cmp ebx,1
- jne L_check_window_mmx
- cmp [esp+40],edi
- je L_check_window_mmx
-
- dec edi
- mov ecx,edx
- mov al, [edi]
- sub ecx,3
-
- mov [edi+1],al
- mov [edi+2],al
- mov [edi+3],al
- add edi,4
- rep stosb
-
- mov ebx, [esp+8]
- jmp L_while_test_mmx
-
-ALIGN 4
-L_test_for_second_level_length_mmx:
- test al,64
- jnz L_test_for_end_of_block
-
- and eax,15
- psrlq mm0,mm1
- movd ecx,mm0
- and ecx, [inflate_fast_mask+eax*4]
- add ecx,edx
- mov eax, [ebx+ecx*4]
- jmp L_dolen_mmx
-
-ALIGN 4
-L_test_for_second_level_dist_mmx:
- test al,64
- jnz L_invalid_distance_code
-
- and eax,15
- psrlq mm0,mm1
- movd ecx,mm0
- and ecx, [inflate_fast_mask+eax*4]
- mov eax, [esp+12]
- add ecx,ebx
- mov eax, [eax+ecx*4]
- jmp L_dodist_mmx
-
-ALIGN 4
-L_clip_window_mmx:
-
- mov ecx,eax
- mov eax, [esp+52]
- neg ecx
- mov esi, [esp+56]
-
- cmp eax,ebx
- jb L_invalid_distance_too_far
-
- add ecx,ebx
- cmp dword ptr [esp+48],0
- jne L_wrap_around_window_mmx
-
- sub eax,ecx
- add esi,eax
-
- cmp edx,ecx
- jbe L_do_copy1_mmx
-
- sub edx,ecx
- rep movsb
- mov esi,edi
- sub esi,ebx
- jmp L_do_copy1_mmx
-
- cmp edx,ecx
- jbe L_do_copy1_mmx
-
- sub edx,ecx
- rep movsb
- mov esi,edi
- sub esi,ebx
- jmp L_do_copy1_mmx
-
-L_wrap_around_window_mmx:
-
- mov eax, [esp+48]
- cmp ecx,eax
- jbe L_contiguous_in_window_mmx
-
- add esi, [esp+52]
- add esi,eax
- sub esi,ecx
- sub ecx,eax
-
-
- cmp edx,ecx
- jbe L_do_copy1_mmx
-
- sub edx,ecx
- rep movsb
- mov esi, [esp+56]
- mov ecx, [esp+48]
- cmp edx,ecx
- jbe L_do_copy1_mmx
-
- sub edx,ecx
- rep movsb
- mov esi,edi
- sub esi,ebx
- jmp L_do_copy1_mmx
-
-L_contiguous_in_window_mmx:
-
- add esi,eax
- sub esi,ecx
-
-
- cmp edx,ecx
- jbe L_do_copy1_mmx
-
- sub edx,ecx
- rep movsb
- mov esi,edi
- sub esi,ebx
-
-L_do_copy1_mmx:
-
-
- mov ecx,edx
- rep movsb
-
- mov esi, [esp+44]
- mov ebx, [esp+8]
- jmp L_while_test_mmx
-; 1174 "inffast.S"
-L_invalid_distance_code:
-
-
-
-
-
- mov ecx, invalid_distance_code_msg
- mov edx,INFLATE_MODE_BAD
- jmp L_update_stream_state
-
-L_test_for_end_of_block:
-
-
-
-
-
- test al,32
- jz L_invalid_literal_length_code
-
- mov ecx,0
- mov edx,INFLATE_MODE_TYPE
- jmp L_update_stream_state
-
-L_invalid_literal_length_code:
-
-
-
-
-
- mov ecx, invalid_literal_length_code_msg
- mov edx,INFLATE_MODE_BAD
- jmp L_update_stream_state
-
-L_invalid_distance_too_far:
-
-
-
- mov esi, [esp+44]
- mov ecx, invalid_distance_too_far_msg
- mov edx,INFLATE_MODE_BAD
- jmp L_update_stream_state
-
-L_update_stream_state:
-
- mov eax, [esp+88]
- test ecx,ecx
- jz L_skip_msg
- mov [eax+24],ecx
-L_skip_msg:
- mov eax, [eax+28]
- mov [eax+mode_state],edx
- jmp L_break_loop
-
-ALIGN 4
-L_break_loop:
-; 1243 "inffast.S"
- cmp dword ptr [inflate_fast_use_mmx],2
- jne L_update_next_in
-
-
-
- mov ebx,ebp
-
-L_update_next_in:
-; 1266 "inffast.S"
- mov eax, [esp+88]
- mov ecx,ebx
- mov edx, [eax+28]
- shr ecx,3
- sub esi,ecx
- shl ecx,3
- sub ebx,ecx
- mov [eax+12],edi
- mov [edx+bits_state],ebx
- mov ecx,ebx
-
- lea ebx, [esp+28]
- cmp [esp+20],ebx
- jne L_buf_not_used
-
- sub esi,ebx
- mov ebx, [eax+0]
- mov [esp+20],ebx
- add esi,ebx
- mov ebx, [eax+4]
- sub ebx,11
- add [esp+20],ebx
-
-L_buf_not_used:
- mov [eax+0],esi
-
- mov ebx,1
- shl ebx,cl
- dec ebx
-
-
-
-
-
- cmp dword ptr [inflate_fast_use_mmx],2
- jne L_update_hold
-
-
-
- psrlq mm0,mm1
- movd ebp,mm0
-
- emms
-
-L_update_hold:
-
-
-
- and ebp,ebx
- mov [edx+hold_state],ebp
-
-
-
-
- mov ebx, [esp+20]
- cmp ebx,esi
- jbe L_last_is_smaller
-
- sub ebx,esi
- add ebx,11
- mov [eax+4],ebx
- jmp L_fixup_out
-L_last_is_smaller:
- sub esi,ebx
- neg esi
- add esi,11
- mov [eax+4],esi
-
-
-
-
-L_fixup_out:
-
- mov ebx, [esp+16]
- cmp ebx,edi
- jbe L_end_is_smaller
-
- sub ebx,edi
- add ebx,257
- mov [eax+16],ebx
- jmp L_done
-L_end_is_smaller:
- sub edi,ebx
- neg edi
- add edi,257
- mov [eax+16],edi
-
-
-
-
-
-L_done:
- add esp,64
- popfd
- pop ebx
- pop ebp
- pop esi
- pop edi
- ret
-_inflate_fast endp
-
-_TEXT ends
-end
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/masmx86/match686.asm
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/masmx86/match686.asm b/c++/libs/zlib-1.2.8/contrib/masmx86/match686.asm
deleted file mode 100644
index 69e0eed..0000000
--- a/c++/libs/zlib-1.2.8/contrib/masmx86/match686.asm
+++ /dev/null
@@ -1,479 +0,0 @@
-; match686.asm -- Asm portion of the optimized longest_match for 32 bits x86
-; Copyright (C) 1995-1996 Jean-loup Gailly, Brian Raiter and Gilles Vollant.
-; File written by Gilles Vollant, by converting match686.S from Brian Raiter
-; for MASM. This is as assembly version of longest_match
-; from Jean-loup Gailly in deflate.c
-;
-; http://www.zlib.net
-; http://www.winimage.com/zLibDll
-; http://www.muppetlabs.com/~breadbox/software/assembly.html
-;
-; For Visual C++ 4.x and higher and ML 6.x and higher
-; ml.exe is distributed in
-; http://www.microsoft.com/downloads/details.aspx?FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64
-;
-; this file contain two implementation of longest_match
-;
-; this longest_match was written by Brian raiter (1998), optimized for Pentium Pro
-; (and the faster known version of match_init on modern Core 2 Duo and AMD Phenom)
-;
-; for using an assembly version of longest_match, you need define ASMV in project
-;
-; compile the asm file running
-; ml /coff /Zi /c /Flmatch686.lst match686.asm
-; and do not include match686.obj in your project
-;
-; note: contrib of zLib 1.2.3 and earlier contained both a deprecated version for
-; Pentium (prior Pentium Pro) and this version for Pentium Pro and modern processor
-; with autoselect (with cpu detection code)
-; if you want support the old pentium optimization, you can still use these version
-;
-; this file is not optimized for old pentium, but it compatible with all x86 32 bits
-; processor (starting 80386)
-;
-;
-; see below : zlib1222add must be adjuster if you use a zlib version < 1.2.2.2
-
-;uInt longest_match(s, cur_match)
-; deflate_state *s;
-; IPos cur_match; /* current match */
-
- NbStack equ 76
- cur_match equ dword ptr[esp+NbStack-0]
- str_s equ dword ptr[esp+NbStack-4]
-; 5 dword on top (ret,ebp,esi,edi,ebx)
- adrret equ dword ptr[esp+NbStack-8]
- pushebp equ dword ptr[esp+NbStack-12]
- pushedi equ dword ptr[esp+NbStack-16]
- pushesi equ dword ptr[esp+NbStack-20]
- pushebx equ dword ptr[esp+NbStack-24]
-
- chain_length equ dword ptr [esp+NbStack-28]
- limit equ dword ptr [esp+NbStack-32]
- best_len equ dword ptr [esp+NbStack-36]
- window equ dword ptr [esp+NbStack-40]
- prev equ dword ptr [esp+NbStack-44]
- scan_start equ word ptr [esp+NbStack-48]
- wmask equ dword ptr [esp+NbStack-52]
- match_start_ptr equ dword ptr [esp+NbStack-56]
- nice_match equ dword ptr [esp+NbStack-60]
- scan equ dword ptr [esp+NbStack-64]
-
- windowlen equ dword ptr [esp+NbStack-68]
- match_start equ dword ptr [esp+NbStack-72]
- strend equ dword ptr [esp+NbStack-76]
- NbStackAdd equ (NbStack-24)
-
- .386p
-
- name gvmatch
- .MODEL FLAT
-
-
-
-; all the +zlib1222add offsets are due to the addition of fields
-; in zlib in the deflate_state structure since the asm code was first written
-; (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)").
-; (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0").
-; if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8").
-
- zlib1222add equ 8
-
-; Note : these value are good with a 8 bytes boundary pack structure
- dep_chain_length equ 74h+zlib1222add
- dep_window equ 30h+zlib1222add
- dep_strstart equ 64h+zlib1222add
- dep_prev_length equ 70h+zlib1222add
- dep_nice_match equ 88h+zlib1222add
- dep_w_size equ 24h+zlib1222add
- dep_prev equ 38h+zlib1222add
- dep_w_mask equ 2ch+zlib1222add
- dep_good_match equ 84h+zlib1222add
- dep_match_start equ 68h+zlib1222add
- dep_lookahead equ 6ch+zlib1222add
-
-
-_TEXT segment
-
-IFDEF NOUNDERLINE
- public longest_match
- public match_init
-ELSE
- public _longest_match
- public _match_init
-ENDIF
-
- MAX_MATCH equ 258
- MIN_MATCH equ 3
- MIN_LOOKAHEAD equ (MAX_MATCH+MIN_MATCH+1)
-
-
-
-MAX_MATCH equ 258
-MIN_MATCH equ 3
-MIN_LOOKAHEAD equ (MAX_MATCH + MIN_MATCH + 1)
-MAX_MATCH_8_ equ ((MAX_MATCH + 7) AND 0FFF0h)
-
-
-;;; stack frame offsets
-
-chainlenwmask equ esp + 0 ; high word: current chain len
- ; low word: s->wmask
-window equ esp + 4 ; local copy of s->window
-windowbestlen equ esp + 8 ; s->window + bestlen
-scanstart equ esp + 16 ; first two bytes of string
-scanend equ esp + 12 ; last two bytes of string
-scanalign equ esp + 20 ; dword-misalignment of string
-nicematch equ esp + 24 ; a good enough match size
-bestlen equ esp + 28 ; size of best match so far
-scan equ esp + 32 ; ptr to string wanting match
-
-LocalVarsSize equ 36
-; saved ebx byte esp + 36
-; saved edi byte esp + 40
-; saved esi byte esp + 44
-; saved ebp byte esp + 48
-; return address byte esp + 52
-deflatestate equ esp + 56 ; the function arguments
-curmatch equ esp + 60
-
-;;; Offsets for fields in the deflate_state structure. These numbers
-;;; are calculated from the definition of deflate_state, with the
-;;; assumption that the compiler will dword-align the fields. (Thus,
-;;; changing the definition of deflate_state could easily cause this
-;;; program to crash horribly, without so much as a warning at
-;;; compile time. Sigh.)
-
-dsWSize equ 36+zlib1222add
-dsWMask equ 44+zlib1222add
-dsWindow equ 48+zlib1222add
-dsPrev equ 56+zlib1222add
-dsMatchLen equ 88+zlib1222add
-dsPrevMatch equ 92+zlib1222add
-dsStrStart equ 100+zlib1222add
-dsMatchStart equ 104+zlib1222add
-dsLookahead equ 108+zlib1222add
-dsPrevLen equ 112+zlib1222add
-dsMaxChainLen equ 116+zlib1222add
-dsGoodMatch equ 132+zlib1222add
-dsNiceMatch equ 136+zlib1222add
-
-
-;;; match686.asm -- Pentium-Pro-optimized version of longest_match()
-;;; Written for zlib 1.1.2
-;;; Copyright (C) 1998 Brian Raiter <br...@muppetlabs.com>
-;;; You can look at http://www.muppetlabs.com/~breadbox/software/assembly.html
-;;;
-;;
-;; This software is provided 'as-is', without any express or implied
-;; warranty. In no event will the authors be held liable for any damages
-;; arising from the use of this software.
-;;
-;; Permission is granted to anyone to use this software for any purpose,
-;; including commercial applications, and to alter it and redistribute it
-;; freely, subject to the following restrictions:
-;;
-;; 1. The origin of this software must not be misrepresented; you must not
-;; claim that you wrote the original software. If you use this software
-;; in a product, an acknowledgment in the product documentation would be
-;; appreciated but is not required.
-;; 2. Altered source versions must be plainly marked as such, and must not be
-;; misrepresented as being the original software
-;; 3. This notice may not be removed or altered from any source distribution.
-;;
-
-;GLOBAL _longest_match, _match_init
-
-
-;SECTION .text
-
-;;; uInt longest_match(deflate_state *deflatestate, IPos curmatch)
-
-;_longest_match:
- IFDEF NOUNDERLINE
- longest_match proc near
- ELSE
- _longest_match proc near
- ENDIF
-.FPO (9, 4, 0, 0, 1, 0)
-
-;;; Save registers that the compiler may be using, and adjust esp to
-;;; make room for our stack frame.
-
- push ebp
- push edi
- push esi
- push ebx
- sub esp, LocalVarsSize
-
-;;; Retrieve the function arguments. ecx will hold cur_match
-;;; throughout the entire function. edx will hold the pointer to the
-;;; deflate_state structure during the function's setup (before
-;;; entering the main loop.
-
- mov edx, [deflatestate]
- mov ecx, [curmatch]
-
-;;; uInt wmask = s->w_mask;
-;;; unsigned chain_length = s->max_chain_length;
-;;; if (s->prev_length >= s->good_match) {
-;;; chain_length >>= 2;
-;;; }
-
- mov eax, [edx + dsPrevLen]
- mov ebx, [edx + dsGoodMatch]
- cmp eax, ebx
- mov eax, [edx + dsWMask]
- mov ebx, [edx + dsMaxChainLen]
- jl LastMatchGood
- shr ebx, 2
-LastMatchGood:
-
-;;; chainlen is decremented once beforehand so that the function can
-;;; use the sign flag instead of the zero flag for the exit test.
-;;; It is then shifted into the high word, to make room for the wmask
-;;; value, which it will always accompany.
-
- dec ebx
- shl ebx, 16
- or ebx, eax
- mov [chainlenwmask], ebx
-
-;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
-
- mov eax, [edx + dsNiceMatch]
- mov ebx, [edx + dsLookahead]
- cmp ebx, eax
- jl LookaheadLess
- mov ebx, eax
-LookaheadLess: mov [nicematch], ebx
-
-;;; register Bytef *scan = s->window + s->strstart;
-
- mov esi, [edx + dsWindow]
- mov [window], esi
- mov ebp, [edx + dsStrStart]
- lea edi, [esi + ebp]
- mov [scan], edi
-
-;;; Determine how many bytes the scan ptr is off from being
-;;; dword-aligned.
-
- mov eax, edi
- neg eax
- and eax, 3
- mov [scanalign], eax
-
-;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
-;;; s->strstart - (IPos)MAX_DIST(s) : NIL;
-
- mov eax, [edx + dsWSize]
- sub eax, MIN_LOOKAHEAD
- sub ebp, eax
- jg LimitPositive
- xor ebp, ebp
-LimitPositive:
-
-;;; int best_len = s->prev_length;
-
- mov eax, [edx + dsPrevLen]
- mov [bestlen], eax
-
-;;; Store the sum of s->window + best_len in esi locally, and in esi.
-
- add esi, eax
- mov [windowbestlen], esi
-
-;;; register ush scan_start = *(ushf*)scan;
-;;; register ush scan_end = *(ushf*)(scan+best_len-1);
-;;; Posf *prev = s->prev;
-
- movzx ebx, word ptr [edi]
- mov [scanstart], ebx
- movzx ebx, word ptr [edi + eax - 1]
- mov [scanend], ebx
- mov edi, [edx + dsPrev]
-
-;;; Jump into the main loop.
-
- mov edx, [chainlenwmask]
- jmp short LoopEntry
-
-align 4
-
-;;; do {
-;;; match = s->window + cur_match;
-;;; if (*(ushf*)(match+best_len-1) != scan_end ||
-;;; *(ushf*)match != scan_start) continue;
-;;; [...]
-;;; } while ((cur_match = prev[cur_match & wmask]) > limit
-;;; && --chain_length != 0);
-;;;
-;;; Here is the inner loop of the function. The function will spend the
-;;; majority of its time in this loop, and majority of that time will
-;;; be spent in the first ten instructions.
-;;;
-;;; Within this loop:
-;;; ebx = scanend
-;;; ecx = curmatch
-;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)
-;;; esi = windowbestlen - i.e., (window + bestlen)
-;;; edi = prev
-;;; ebp = limit
-
-LookupLoop:
- and ecx, edx
- movzx ecx, word ptr [edi + ecx*2]
- cmp ecx, ebp
- jbe LeaveNow
- sub edx, 00010000h
- js LeaveNow
-LoopEntry: movzx eax, word ptr [esi + ecx - 1]
- cmp eax, ebx
- jnz LookupLoop
- mov eax, [window]
- movzx eax, word ptr [eax + ecx]
- cmp eax, [scanstart]
- jnz LookupLoop
-
-;;; Store the current value of chainlen.
-
- mov [chainlenwmask], edx
-
-;;; Point edi to the string under scrutiny, and esi to the string we
-;;; are hoping to match it up with. In actuality, esi and edi are
-;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is
-;;; initialized to -(MAX_MATCH_8 - scanalign).
-
- mov esi, [window]
- mov edi, [scan]
- add esi, ecx
- mov eax, [scanalign]
- mov edx, 0fffffef8h; -(MAX_MATCH_8)
- lea edi, [edi + eax + 0108h] ;MAX_MATCH_8]
- lea esi, [esi + eax + 0108h] ;MAX_MATCH_8]
-
-;;; Test the strings for equality, 8 bytes at a time. At the end,
-;;; adjust edx so that it is offset to the exact byte that mismatched.
-;;;
-;;; We already know at this point that the first three bytes of the
-;;; strings match each other, and they can be safely passed over before
-;;; starting the compare loop. So what this code does is skip over 0-3
-;;; bytes, as much as necessary in order to dword-align the edi
-;;; pointer. (esi will still be misaligned three times out of four.)
-;;;
-;;; It should be confessed that this loop usually does not represent
-;;; much of the total running time. Replacing it with a more
-;;; straightforward "rep cmpsb" would not drastically degrade
-;;; performance.
-
-LoopCmps:
- mov eax, [esi + edx]
- xor eax, [edi + edx]
- jnz LeaveLoopCmps
- mov eax, [esi + edx + 4]
- xor eax, [edi + edx + 4]
- jnz LeaveLoopCmps4
- add edx, 8
- jnz LoopCmps
- jmp short LenMaximum
-LeaveLoopCmps4: add edx, 4
-LeaveLoopCmps: test eax, 0000FFFFh
- jnz LenLower
- add edx, 2
- shr eax, 16
-LenLower: sub al, 1
- adc edx, 0
-
-;;; Calculate the length of the match. If it is longer than MAX_MATCH,
-;;; then automatically accept it as the best possible match and leave.
-
- lea eax, [edi + edx]
- mov edi, [scan]
- sub eax, edi
- cmp eax, MAX_MATCH
- jge LenMaximum
-
-;;; If the length of the match is not longer than the best match we
-;;; have so far, then forget it and return to the lookup loop.
-
- mov edx, [deflatestate]
- mov ebx, [bestlen]
- cmp eax, ebx
- jg LongerMatch
- mov esi, [windowbestlen]
- mov edi, [edx + dsPrev]
- mov ebx, [scanend]
- mov edx, [chainlenwmask]
- jmp LookupLoop
-
-;;; s->match_start = cur_match;
-;;; best_len = len;
-;;; if (len >= nice_match) break;
-;;; scan_end = *(ushf*)(scan+best_len-1);
-
-LongerMatch: mov ebx, [nicematch]
- mov [bestlen], eax
- mov [edx + dsMatchStart], ecx
- cmp eax, ebx
- jge LeaveNow
- mov esi, [window]
- add esi, eax
- mov [windowbestlen], esi
- movzx ebx, word ptr [edi + eax - 1]
- mov edi, [edx + dsPrev]
- mov [scanend], ebx
- mov edx, [chainlenwmask]
- jmp LookupLoop
-
-;;; Accept the current string, with the maximum possible length.
-
-LenMaximum: mov edx, [deflatestate]
- mov dword ptr [bestlen], MAX_MATCH
- mov [edx + dsMatchStart], ecx
-
-;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
-;;; return s->lookahead;
-
-LeaveNow:
- mov edx, [deflatestate]
- mov ebx, [bestlen]
- mov eax, [edx + dsLookahead]
- cmp ebx, eax
- jg LookaheadRet
- mov eax, ebx
-LookaheadRet:
-
-;;; Restore the stack and return from whence we came.
-
- add esp, LocalVarsSize
- pop ebx
- pop esi
- pop edi
- pop ebp
-
- ret
-; please don't remove this string !
-; Your can freely use match686 in any free or commercial app if you don't remove the string in the binary!
- db 0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998",0dh,0ah
-
-
- IFDEF NOUNDERLINE
- longest_match endp
- ELSE
- _longest_match endp
- ENDIF
-
- IFDEF NOUNDERLINE
- match_init proc near
- ret
- match_init endp
- ELSE
- _match_init proc near
- ret
- _match_init endp
- ENDIF
-
-
-_TEXT ends
-end
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/masmx86/readme.txt
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/masmx86/readme.txt b/c++/libs/zlib-1.2.8/contrib/masmx86/readme.txt
deleted file mode 100644
index 3f88886..0000000
--- a/c++/libs/zlib-1.2.8/contrib/masmx86/readme.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-
-Summary
--------
-This directory contains ASM implementations of the functions
-longest_match() and inflate_fast().
-
-
-Use instructions
-----------------
-Assemble using MASM, and copy the object files into the zlib source
-directory, then run the appropriate makefile, as suggested below. You can
-donwload MASM from here:
-
- http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64
-
-You can also get objects files here:
-
- http://www.winimage.com/zLibDll/zlib124_masm_obj.zip
-
-Build instructions
-------------------
-* With Microsoft C and MASM:
-nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj"
-
-* With Borland C and TASM:
-make -f win32/Makefile.bor LOCAL_ZLIB="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" OBJPA="+match686c.obj+match686.obj+inffas32.obj"
-
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/minizip/Makefile
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/minizip/Makefile b/c++/libs/zlib-1.2.8/contrib/minizip/Makefile
deleted file mode 100644
index 84eaad2..0000000
--- a/c++/libs/zlib-1.2.8/contrib/minizip/Makefile
+++ /dev/null
@@ -1,25 +0,0 @@
-CC=cc
-CFLAGS=-O -I../..
-
-UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a
-ZIP_OBJS = minizip.o zip.o ioapi.o ../../libz.a
-
-.c.o:
- $(CC) -c $(CFLAGS) $*.c
-
-all: miniunz minizip
-
-miniunz: $(UNZ_OBJS)
- $(CC) $(CFLAGS) -o $@ $(UNZ_OBJS)
-
-minizip: $(ZIP_OBJS)
- $(CC) $(CFLAGS) -o $@ $(ZIP_OBJS)
-
-test: miniunz minizip
- ./minizip test readme.txt
- ./miniunz -l test.zip
- mv readme.txt readme.old
- ./miniunz test.zip
-
-clean:
- /bin/rm -f *.o *~ minizip miniunz
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/minizip/Makefile.am
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/minizip/Makefile.am b/c++/libs/zlib-1.2.8/contrib/minizip/Makefile.am
deleted file mode 100644
index d343011..0000000
--- a/c++/libs/zlib-1.2.8/contrib/minizip/Makefile.am
+++ /dev/null
@@ -1,45 +0,0 @@
-lib_LTLIBRARIES = libminizip.la
-
-if COND_DEMOS
-bin_PROGRAMS = miniunzip minizip
-endif
-
-zlib_top_srcdir = $(top_srcdir)/../..
-zlib_top_builddir = $(top_builddir)/../..
-
-AM_CPPFLAGS = -I$(zlib_top_srcdir)
-AM_LDFLAGS = -L$(zlib_top_builddir)
-
-if WIN32
-iowin32_src = iowin32.c
-iowin32_h = iowin32.h
-endif
-
-libminizip_la_SOURCES = \
- ioapi.c \
- mztools.c \
- unzip.c \
- zip.c \
- ${iowin32_src}
-
-libminizip_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0 -lz
-
-minizip_includedir = $(includedir)/minizip
-minizip_include_HEADERS = \
- crypt.h \
- ioapi.h \
- mztools.h \
- unzip.h \
- zip.h \
- ${iowin32_h}
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = minizip.pc
-
-EXTRA_PROGRAMS = miniunzip minizip
-
-miniunzip_SOURCES = miniunz.c
-miniunzip_LDADD = libminizip.la
-
-minizip_SOURCES = minizip.c
-minizip_LDADD = libminizip.la -lz
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/minizip/MiniZip64_Changes.txt
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/minizip/MiniZip64_Changes.txt b/c++/libs/zlib-1.2.8/contrib/minizip/MiniZip64_Changes.txt
deleted file mode 100644
index 13a1bd9..0000000
--- a/c++/libs/zlib-1.2.8/contrib/minizip/MiniZip64_Changes.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-
-MiniZip 1.1 was derrived from MiniZip at version 1.01f
-
-Change in 1.0 (Okt 2009)
- - **TODO - Add history**
-
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/minizip/MiniZip64_info.txt
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/minizip/MiniZip64_info.txt b/c++/libs/zlib-1.2.8/contrib/minizip/MiniZip64_info.txt
deleted file mode 100644
index 57d7152..0000000
--- a/c++/libs/zlib-1.2.8/contrib/minizip/MiniZip64_info.txt
+++ /dev/null
@@ -1,74 +0,0 @@
-MiniZip - Copyright (c) 1998-2010 - by Gilles Vollant - version 1.1 64 bits from Mathias Svensson
-
-Introduction
----------------------
-MiniZip 1.1 is built from MiniZip 1.0 by Gilles Vollant ( http://www.winimage.com/zLibDll/minizip.html )
-
-When adding ZIP64 support into minizip it would result into risk of breaking compatibility with minizip 1.0.
-All possible work was done for compatibility.
-
-
-Background
----------------------
-When adding ZIP64 support Mathias Svensson found that Even Rouault have added ZIP64
-support for unzip.c into minizip for a open source project called gdal ( http://www.gdal.org/ )
-
-That was used as a starting point. And after that ZIP64 support was added to zip.c
-some refactoring and code cleanup was also done.
-
-
-Changed from MiniZip 1.0 to MiniZip 1.1
----------------------------------------
-* Added ZIP64 support for unzip ( by Even Rouault )
-* Added ZIP64 support for zip ( by Mathias Svensson )
-* Reverted some changed that Even Rouault did.
-* Bunch of patches received from Gulles Vollant that he received for MiniZip from various users.
-* Added unzip patch for BZIP Compression method (patch create by Daniel Borca)
-* Added BZIP Compress method for zip
-* Did some refactoring and code cleanup
-
-
-Credits
-
- Gilles Vollant - Original MiniZip author
- Even Rouault - ZIP64 unzip Support
- Daniel Borca - BZip Compression method support in unzip
- Mathias Svensson - ZIP64 zip support
- Mathias Svensson - BZip Compression method support in zip
-
- Resources
-
- ZipLayout http://result42.com/projects/ZipFileLayout
- Command line tool for Windows that shows the layout and information of the headers in a zip archive.
- Used when debugging and validating the creation of zip files using MiniZip64
-
-
- ZIP App Note http://www.pkware.com/documents/casestudies/APPNOTE.TXT
- Zip File specification
-
-
-Notes.
- * To be able to use BZip compression method in zip64.c or unzip64.c the BZIP2 lib is needed and HAVE_BZIP2 need to be defined.
-
-License
-----------------------------------------------------------
- Condition of use and distribution are the same than zlib :
-
- This software is provided 'as-is', without any express or implied
- warranty. In no event will the authors be held liable for any damages
- arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source distribution.
-
-----------------------------------------------------------
-
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/minizip/configure.ac
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/minizip/configure.ac b/c++/libs/zlib-1.2.8/contrib/minizip/configure.ac
deleted file mode 100644
index 827a4e0..0000000
--- a/c++/libs/zlib-1.2.8/contrib/minizip/configure.ac
+++ /dev/null
@@ -1,32 +0,0 @@
-# -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
-
-AC_INIT([minizip], [1.2.8], [bugzilla.redhat.com])
-AC_CONFIG_SRCDIR([minizip.c])
-AM_INIT_AUTOMAKE([foreign])
-LT_INIT
-
-AC_MSG_CHECKING([whether to build example programs])
-AC_ARG_ENABLE([demos], AC_HELP_STRING([--enable-demos], [build example programs]))
-AM_CONDITIONAL([COND_DEMOS], [test "$enable_demos" = yes])
-if test "$enable_demos" = yes
-then
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-
-case "${host}" in
- *-mingw* | mingw*)
- WIN32="yes"
- ;;
- *)
- ;;
-esac
-AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"])
-
-
-AC_SUBST([HAVE_UNISTD_H], [0])
-AC_CHECK_HEADER([unistd.h], [HAVE_UNISTD_H=1], [])
-AC_CONFIG_FILES([Makefile minizip.pc])
-AC_OUTPUT
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/minizip/crypt.h
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/minizip/crypt.h b/c++/libs/zlib-1.2.8/contrib/minizip/crypt.h
deleted file mode 100644
index 1e9e820..0000000
--- a/c++/libs/zlib-1.2.8/contrib/minizip/crypt.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/* crypt.h -- base code for crypt/uncrypt ZIPfile
-
-
- Version 1.01e, February 12th, 2005
-
- Copyright (C) 1998-2005 Gilles Vollant
-
- This code is a modified version of crypting code in Infozip distribution
-
- The encryption/decryption parts of this source code (as opposed to the
- non-echoing password parts) were originally written in Europe. The
- whole source package can be freely distributed, including from the USA.
- (Prior to January 2000, re-export from the US was a violation of US law.)
-
- This encryption code is a direct transcription of the algorithm from
- Roger Schlafly, described by Phil Katz in the file appnote.txt. This
- file (appnote.txt) is distributed with the PKZIP program (even in the
- version without encryption capabilities).
-
- If you don't need crypting in your application, just define symbols
- NOCRYPT and NOUNCRYPT.
-
- This code support the "Traditional PKWARE Encryption".
-
- The new AES encryption added on Zip format by Winzip (see the page
- http://www.winzip.com/aes_info.htm ) and PKWare PKZip 5.x Strong
- Encryption is not supported.
-*/
-
-#define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8))
-
-/***********************************************************************
- * Return the next byte in the pseudo-random sequence
- */
-static int decrypt_byte(unsigned long* pkeys, const z_crc_t* pcrc_32_tab)
-{
- unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an
- * unpredictable manner on 16-bit systems; not a problem
- * with any known compiler so far, though */
-
- temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2;
- return (int)(((temp * (temp ^ 1)) >> 8) & 0xff);
-}
-
-/***********************************************************************
- * Update the encryption keys with the next byte of plain text
- */
-static int update_keys(unsigned long* pkeys,const z_crc_t* pcrc_32_tab,int c)
-{
- (*(pkeys+0)) = CRC32((*(pkeys+0)), c);
- (*(pkeys+1)) += (*(pkeys+0)) & 0xff;
- (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1;
- {
- register int keyshift = (int)((*(pkeys+1)) >> 24);
- (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift);
- }
- return c;
-}
-
-
-/***********************************************************************
- * Initialize the encryption keys and the random header according to
- * the given password.
- */
-static void init_keys(const char* passwd,unsigned long* pkeys,const z_crc_t* pcrc_32_tab)
-{
- *(pkeys+0) = 305419896L;
- *(pkeys+1) = 591751049L;
- *(pkeys+2) = 878082192L;
- while (*passwd != '\0') {
- update_keys(pkeys,pcrc_32_tab,(int)*passwd);
- passwd++;
- }
-}
-
-#define zdecode(pkeys,pcrc_32_tab,c) \
- (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab)))
-
-#define zencode(pkeys,pcrc_32_tab,c,t) \
- (t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), t^(c))
-
-#ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED
-
-#define RAND_HEAD_LEN 12
- /* "last resort" source for second part of crypt seed pattern */
-# ifndef ZCR_SEED2
-# define ZCR_SEED2 3141592654UL /* use PI as default pattern */
-# endif
-
-static int crypthead(const char* passwd, /* password string */
- unsigned char* buf, /* where to write header */
- int bufSize,
- unsigned long* pkeys,
- const z_crc_t* pcrc_32_tab,
- unsigned long crcForCrypting)
-{
- int n; /* index in random header */
- int t; /* temporary */
- int c; /* random byte */
- unsigned char header[RAND_HEAD_LEN-2]; /* random header */
- static unsigned calls = 0; /* ensure different random header each time */
-
- if (bufSize<RAND_HEAD_LEN)
- return 0;
-
- /* First generate RAND_HEAD_LEN-2 random bytes. We encrypt the
- * output of rand() to get less predictability, since rand() is
- * often poorly implemented.
- */
- if (++calls == 1)
- {
- srand((unsigned)(time(NULL) ^ ZCR_SEED2));
- }
- init_keys(passwd, pkeys, pcrc_32_tab);
- for (n = 0; n < RAND_HEAD_LEN-2; n++)
- {
- c = (rand() >> 7) & 0xff;
- header[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, c, t);
- }
- /* Encrypt random header (last two bytes is high word of crc) */
- init_keys(passwd, pkeys, pcrc_32_tab);
- for (n = 0; n < RAND_HEAD_LEN-2; n++)
- {
- buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t);
- }
- buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t);
- buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t);
- return n;
-}
-
-#endif
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/minizip/ioapi.c
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/minizip/ioapi.c b/c++/libs/zlib-1.2.8/contrib/minizip/ioapi.c
deleted file mode 100644
index 7f5c191..0000000
--- a/c++/libs/zlib-1.2.8/contrib/minizip/ioapi.c
+++ /dev/null
@@ -1,247 +0,0 @@
-/* ioapi.h -- IO base function header for compress/uncompress .zip
- part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
-
- Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
-
- Modifications for Zip64 support
- Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
-
- For more info read MiniZip_info.txt
-
-*/
-
-#if defined(_WIN32) && (!(defined(_CRT_SECURE_NO_WARNINGS)))
- #define _CRT_SECURE_NO_WARNINGS
-#endif
-
-#if defined(__APPLE__) || defined(IOAPI_NO_64)
-// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
-#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
-#define FTELLO_FUNC(stream) ftello(stream)
-#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin)
-#else
-#define FOPEN_FUNC(filename, mode) fopen64(filename, mode)
-#define FTELLO_FUNC(stream) ftello64(stream)
-#define FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin)
-#endif
-
-
-#include "ioapi.h"
-
-voidpf call_zopen64 (const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode)
-{
- if (pfilefunc->zfile_func64.zopen64_file != NULL)
- return (*(pfilefunc->zfile_func64.zopen64_file)) (pfilefunc->zfile_func64.opaque,filename,mode);
- else
- {
- return (*(pfilefunc->zopen32_file))(pfilefunc->zfile_func64.opaque,(const char*)filename,mode);
- }
-}
-
-long call_zseek64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin)
-{
- if (pfilefunc->zfile_func64.zseek64_file != NULL)
- return (*(pfilefunc->zfile_func64.zseek64_file)) (pfilefunc->zfile_func64.opaque,filestream,offset,origin);
- else
- {
- uLong offsetTruncated = (uLong)offset;
- if (offsetTruncated != offset)
- return -1;
- else
- return (*(pfilefunc->zseek32_file))(pfilefunc->zfile_func64.opaque,filestream,offsetTruncated,origin);
- }
-}
-
-ZPOS64_T call_ztell64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream)
-{
- if (pfilefunc->zfile_func64.zseek64_file != NULL)
- return (*(pfilefunc->zfile_func64.ztell64_file)) (pfilefunc->zfile_func64.opaque,filestream);
- else
- {
- uLong tell_uLong = (*(pfilefunc->ztell32_file))(pfilefunc->zfile_func64.opaque,filestream);
- if ((tell_uLong) == MAXU32)
- return (ZPOS64_T)-1;
- else
- return tell_uLong;
- }
-}
-
-void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32)
-{
- p_filefunc64_32->zfile_func64.zopen64_file = NULL;
- p_filefunc64_32->zopen32_file = p_filefunc32->zopen_file;
- p_filefunc64_32->zfile_func64.zerror_file = p_filefunc32->zerror_file;
- p_filefunc64_32->zfile_func64.zread_file = p_filefunc32->zread_file;
- p_filefunc64_32->zfile_func64.zwrite_file = p_filefunc32->zwrite_file;
- p_filefunc64_32->zfile_func64.ztell64_file = NULL;
- p_filefunc64_32->zfile_func64.zseek64_file = NULL;
- p_filefunc64_32->zfile_func64.zclose_file = p_filefunc32->zclose_file;
- p_filefunc64_32->zfile_func64.zerror_file = p_filefunc32->zerror_file;
- p_filefunc64_32->zfile_func64.opaque = p_filefunc32->opaque;
- p_filefunc64_32->zseek32_file = p_filefunc32->zseek_file;
- p_filefunc64_32->ztell32_file = p_filefunc32->ztell_file;
-}
-
-
-
-static voidpf ZCALLBACK fopen_file_func OF((voidpf opaque, const char* filename, int mode));
-static uLong ZCALLBACK fread_file_func OF((voidpf opaque, voidpf stream, void* buf, uLong size));
-static uLong ZCALLBACK fwrite_file_func OF((voidpf opaque, voidpf stream, const void* buf,uLong size));
-static ZPOS64_T ZCALLBACK ftell64_file_func OF((voidpf opaque, voidpf stream));
-static long ZCALLBACK fseek64_file_func OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin));
-static int ZCALLBACK fclose_file_func OF((voidpf opaque, voidpf stream));
-static int ZCALLBACK ferror_file_func OF((voidpf opaque, voidpf stream));
-
-static voidpf ZCALLBACK fopen_file_func (voidpf opaque, const char* filename, int mode)
-{
- FILE* file = NULL;
- const char* mode_fopen = NULL;
- if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
- mode_fopen = "rb";
- else
- if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
- mode_fopen = "r+b";
- else
- if (mode & ZLIB_FILEFUNC_MODE_CREATE)
- mode_fopen = "wb";
-
- if ((filename!=NULL) && (mode_fopen != NULL))
- file = fopen(filename, mode_fopen);
- return file;
-}
-
-static voidpf ZCALLBACK fopen64_file_func (voidpf opaque, const void* filename, int mode)
-{
- FILE* file = NULL;
- const char* mode_fopen = NULL;
- if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
- mode_fopen = "rb";
- else
- if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
- mode_fopen = "r+b";
- else
- if (mode & ZLIB_FILEFUNC_MODE_CREATE)
- mode_fopen = "wb";
-
- if ((filename!=NULL) && (mode_fopen != NULL))
- file = FOPEN_FUNC((const char*)filename, mode_fopen);
- return file;
-}
-
-
-static uLong ZCALLBACK fread_file_func (voidpf opaque, voidpf stream, void* buf, uLong size)
-{
- uLong ret;
- ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream);
- return ret;
-}
-
-static uLong ZCALLBACK fwrite_file_func (voidpf opaque, voidpf stream, const void* buf, uLong size)
-{
- uLong ret;
- ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream);
- return ret;
-}
-
-static long ZCALLBACK ftell_file_func (voidpf opaque, voidpf stream)
-{
- long ret;
- ret = ftell((FILE *)stream);
- return ret;
-}
-
-
-static ZPOS64_T ZCALLBACK ftell64_file_func (voidpf opaque, voidpf stream)
-{
- ZPOS64_T ret;
- ret = FTELLO_FUNC((FILE *)stream);
- return ret;
-}
-
-static long ZCALLBACK fseek_file_func (voidpf opaque, voidpf stream, uLong offset, int origin)
-{
- int fseek_origin=0;
- long ret;
- switch (origin)
- {
- case ZLIB_FILEFUNC_SEEK_CUR :
- fseek_origin = SEEK_CUR;
- break;
- case ZLIB_FILEFUNC_SEEK_END :
- fseek_origin = SEEK_END;
- break;
- case ZLIB_FILEFUNC_SEEK_SET :
- fseek_origin = SEEK_SET;
- break;
- default: return -1;
- }
- ret = 0;
- if (fseek((FILE *)stream, offset, fseek_origin) != 0)
- ret = -1;
- return ret;
-}
-
-static long ZCALLBACK fseek64_file_func (voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)
-{
- int fseek_origin=0;
- long ret;
- switch (origin)
- {
- case ZLIB_FILEFUNC_SEEK_CUR :
- fseek_origin = SEEK_CUR;
- break;
- case ZLIB_FILEFUNC_SEEK_END :
- fseek_origin = SEEK_END;
- break;
- case ZLIB_FILEFUNC_SEEK_SET :
- fseek_origin = SEEK_SET;
- break;
- default: return -1;
- }
- ret = 0;
-
- if(FSEEKO_FUNC((FILE *)stream, offset, fseek_origin) != 0)
- ret = -1;
-
- return ret;
-}
-
-
-static int ZCALLBACK fclose_file_func (voidpf opaque, voidpf stream)
-{
- int ret;
- ret = fclose((FILE *)stream);
- return ret;
-}
-
-static int ZCALLBACK ferror_file_func (voidpf opaque, voidpf stream)
-{
- int ret;
- ret = ferror((FILE *)stream);
- return ret;
-}
-
-void fill_fopen_filefunc (pzlib_filefunc_def)
- zlib_filefunc_def* pzlib_filefunc_def;
-{
- pzlib_filefunc_def->zopen_file = fopen_file_func;
- pzlib_filefunc_def->zread_file = fread_file_func;
- pzlib_filefunc_def->zwrite_file = fwrite_file_func;
- pzlib_filefunc_def->ztell_file = ftell_file_func;
- pzlib_filefunc_def->zseek_file = fseek_file_func;
- pzlib_filefunc_def->zclose_file = fclose_file_func;
- pzlib_filefunc_def->zerror_file = ferror_file_func;
- pzlib_filefunc_def->opaque = NULL;
-}
-
-void fill_fopen64_filefunc (zlib_filefunc64_def* pzlib_filefunc_def)
-{
- pzlib_filefunc_def->zopen64_file = fopen64_file_func;
- pzlib_filefunc_def->zread_file = fread_file_func;
- pzlib_filefunc_def->zwrite_file = fwrite_file_func;
- pzlib_filefunc_def->ztell64_file = ftell64_file_func;
- pzlib_filefunc_def->zseek64_file = fseek64_file_func;
- pzlib_filefunc_def->zclose_file = fclose_file_func;
- pzlib_filefunc_def->zerror_file = ferror_file_func;
- pzlib_filefunc_def->opaque = NULL;
-}
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/minizip/ioapi.h
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/minizip/ioapi.h b/c++/libs/zlib-1.2.8/contrib/minizip/ioapi.h
deleted file mode 100644
index 8dcbdb0..0000000
--- a/c++/libs/zlib-1.2.8/contrib/minizip/ioapi.h
+++ /dev/null
@@ -1,208 +0,0 @@
-/* ioapi.h -- IO base function header for compress/uncompress .zip
- part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
-
- Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
-
- Modifications for Zip64 support
- Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
-
- For more info read MiniZip_info.txt
-
- Changes
-
- Oct-2009 - Defined ZPOS64_T to fpos_t on windows and u_int64_t on linux. (might need to find a better why for this)
- Oct-2009 - Change to fseeko64, ftello64 and fopen64 so large files would work on linux.
- More if/def section may be needed to support other platforms
- Oct-2009 - Defined fxxxx64 calls to normal fopen/ftell/fseek so they would compile on windows.
- (but you should use iowin32.c for windows instead)
-
-*/
-
-#ifndef _ZLIBIOAPI64_H
-#define _ZLIBIOAPI64_H
-
-#if (!defined(_WIN32)) && (!defined(WIN32)) && (!defined(__APPLE__))
-
- // Linux needs this to support file operation on files larger then 4+GB
- // But might need better if/def to select just the platforms that needs them.
-
- #ifndef __USE_FILE_OFFSET64
- #define __USE_FILE_OFFSET64
- #endif
- #ifndef __USE_LARGEFILE64
- #define __USE_LARGEFILE64
- #endif
- #ifndef _LARGEFILE64_SOURCE
- #define _LARGEFILE64_SOURCE
- #endif
- #ifndef _FILE_OFFSET_BIT
- #define _FILE_OFFSET_BIT 64
- #endif
-
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include "zlib.h"
-
-#if defined(USE_FILE32API)
-#define fopen64 fopen
-#define ftello64 ftell
-#define fseeko64 fseek
-#else
-#ifdef __FreeBSD__
-#define fopen64 fopen
-#define ftello64 ftello
-#define fseeko64 fseeko
-#endif
-#ifdef _MSC_VER
- #define fopen64 fopen
- #if (_MSC_VER >= 1400) && (!(defined(NO_MSCVER_FILE64_FUNC)))
- #define ftello64 _ftelli64
- #define fseeko64 _fseeki64
- #else // old MSC
- #define ftello64 ftell
- #define fseeko64 fseek
- #endif
-#endif
-#endif
-
-/*
-#ifndef ZPOS64_T
- #ifdef _WIN32
- #define ZPOS64_T fpos_t
- #else
- #include <stdint.h>
- #define ZPOS64_T uint64_t
- #endif
-#endif
-*/
-
-#ifdef HAVE_MINIZIP64_CONF_H
-#include "mz64conf.h"
-#endif
-
-/* a type choosen by DEFINE */
-#ifdef HAVE_64BIT_INT_CUSTOM
-typedef 64BIT_INT_CUSTOM_TYPE ZPOS64_T;
-#else
-#ifdef HAS_STDINT_H
-#include "stdint.h"
-typedef uint64_t ZPOS64_T;
-#else
-
-/* Maximum unsigned 32-bit value used as placeholder for zip64 */
-#define MAXU32 0xffffffff
-
-#if defined(_MSC_VER) || defined(__BORLANDC__)
-typedef unsigned __int64 ZPOS64_T;
-#else
-typedef unsigned long long int ZPOS64_T;
-#endif
-#endif
-#endif
-
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#define ZLIB_FILEFUNC_SEEK_CUR (1)
-#define ZLIB_FILEFUNC_SEEK_END (2)
-#define ZLIB_FILEFUNC_SEEK_SET (0)
-
-#define ZLIB_FILEFUNC_MODE_READ (1)
-#define ZLIB_FILEFUNC_MODE_WRITE (2)
-#define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3)
-
-#define ZLIB_FILEFUNC_MODE_EXISTING (4)
-#define ZLIB_FILEFUNC_MODE_CREATE (8)
-
-
-#ifndef ZCALLBACK
- #if (defined(WIN32) || defined(_WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK)
- #define ZCALLBACK CALLBACK
- #else
- #define ZCALLBACK
- #endif
-#endif
-
-
-
-
-typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode));
-typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size));
-typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
-typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream));
-typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream));
-
-typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream));
-typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin));
-
-
-/* here is the "old" 32 bits structure structure */
-typedef struct zlib_filefunc_def_s
-{
- open_file_func zopen_file;
- read_file_func zread_file;
- write_file_func zwrite_file;
- tell_file_func ztell_file;
- seek_file_func zseek_file;
- close_file_func zclose_file;
- testerror_file_func zerror_file;
- voidpf opaque;
-} zlib_filefunc_def;
-
-typedef ZPOS64_T (ZCALLBACK *tell64_file_func) OF((voidpf opaque, voidpf stream));
-typedef long (ZCALLBACK *seek64_file_func) OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin));
-typedef voidpf (ZCALLBACK *open64_file_func) OF((voidpf opaque, const void* filename, int mode));
-
-typedef struct zlib_filefunc64_def_s
-{
- open64_file_func zopen64_file;
- read_file_func zread_file;
- write_file_func zwrite_file;
- tell64_file_func ztell64_file;
- seek64_file_func zseek64_file;
- close_file_func zclose_file;
- testerror_file_func zerror_file;
- voidpf opaque;
-} zlib_filefunc64_def;
-
-void fill_fopen64_filefunc OF((zlib_filefunc64_def* pzlib_filefunc_def));
-void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
-
-/* now internal definition, only for zip.c and unzip.h */
-typedef struct zlib_filefunc64_32_def_s
-{
- zlib_filefunc64_def zfile_func64;
- open_file_func zopen32_file;
- tell_file_func ztell32_file;
- seek_file_func zseek32_file;
-} zlib_filefunc64_32_def;
-
-
-#define ZREAD64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zread_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size))
-#define ZWRITE64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zwrite_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size))
-//#define ZTELL64(filefunc,filestream) ((*((filefunc).ztell64_file)) ((filefunc).opaque,filestream))
-//#define ZSEEK64(filefunc,filestream,pos,mode) ((*((filefunc).zseek64_file)) ((filefunc).opaque,filestream,pos,mode))
-#define ZCLOSE64(filefunc,filestream) ((*((filefunc).zfile_func64.zclose_file)) ((filefunc).zfile_func64.opaque,filestream))
-#define ZERROR64(filefunc,filestream) ((*((filefunc).zfile_func64.zerror_file)) ((filefunc).zfile_func64.opaque,filestream))
-
-voidpf call_zopen64 OF((const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode));
-long call_zseek64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin));
-ZPOS64_T call_ztell64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream));
-
-void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32);
-
-#define ZOPEN64(filefunc,filename,mode) (call_zopen64((&(filefunc)),(filename),(mode)))
-#define ZTELL64(filefunc,filestream) (call_ztell64((&(filefunc)),(filestream)))
-#define ZSEEK64(filefunc,filestream,pos,mode) (call_zseek64((&(filefunc)),(filestream),(pos),(mode)))
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/minizip/iowin32.c
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/minizip/iowin32.c b/c++/libs/zlib-1.2.8/contrib/minizip/iowin32.c
deleted file mode 100644
index a46d96c..0000000
--- a/c++/libs/zlib-1.2.8/contrib/minizip/iowin32.c
+++ /dev/null
@@ -1,461 +0,0 @@
-/* iowin32.c -- IO base function header for compress/uncompress .zip
- Version 1.1, February 14h, 2010
- part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
-
- Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
-
- Modifications for Zip64 support
- Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
-
- For more info read MiniZip_info.txt
-
-*/
-
-#include <stdlib.h>
-
-#include "zlib.h"
-#include "ioapi.h"
-#include "iowin32.h"
-
-#ifndef INVALID_HANDLE_VALUE
-#define INVALID_HANDLE_VALUE (0xFFFFFFFF)
-#endif
-
-#ifndef INVALID_SET_FILE_POINTER
-#define INVALID_SET_FILE_POINTER ((DWORD)-1)
-#endif
-
-
-#if defined(WINAPI_FAMILY_PARTITION) && (!(defined(IOWIN32_USING_WINRT_API)))
-#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
-#define IOWIN32_USING_WINRT_API 1
-#endif
-#endif
-
-voidpf ZCALLBACK win32_open_file_func OF((voidpf opaque, const char* filename, int mode));
-uLong ZCALLBACK win32_read_file_func OF((voidpf opaque, voidpf stream, void* buf, uLong size));
-uLong ZCALLBACK win32_write_file_func OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
-ZPOS64_T ZCALLBACK win32_tell64_file_func OF((voidpf opaque, voidpf stream));
-long ZCALLBACK win32_seek64_file_func OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin));
-int ZCALLBACK win32_close_file_func OF((voidpf opaque, voidpf stream));
-int ZCALLBACK win32_error_file_func OF((voidpf opaque, voidpf stream));
-
-typedef struct
-{
- HANDLE hf;
- int error;
-} WIN32FILE_IOWIN;
-
-
-static void win32_translate_open_mode(int mode,
- DWORD* lpdwDesiredAccess,
- DWORD* lpdwCreationDisposition,
- DWORD* lpdwShareMode,
- DWORD* lpdwFlagsAndAttributes)
-{
- *lpdwDesiredAccess = *lpdwShareMode = *lpdwFlagsAndAttributes = *lpdwCreationDisposition = 0;
-
- if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
- {
- *lpdwDesiredAccess = GENERIC_READ;
- *lpdwCreationDisposition = OPEN_EXISTING;
- *lpdwShareMode = FILE_SHARE_READ;
- }
- else if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
- {
- *lpdwDesiredAccess = GENERIC_WRITE | GENERIC_READ;
- *lpdwCreationDisposition = OPEN_EXISTING;
- }
- else if (mode & ZLIB_FILEFUNC_MODE_CREATE)
- {
- *lpdwDesiredAccess = GENERIC_WRITE | GENERIC_READ;
- *lpdwCreationDisposition = CREATE_ALWAYS;
- }
-}
-
-static voidpf win32_build_iowin(HANDLE hFile)
-{
- voidpf ret=NULL;
-
- if ((hFile != NULL) && (hFile != INVALID_HANDLE_VALUE))
- {
- WIN32FILE_IOWIN w32fiow;
- w32fiow.hf = hFile;
- w32fiow.error = 0;
- ret = malloc(sizeof(WIN32FILE_IOWIN));
-
- if (ret==NULL)
- CloseHandle(hFile);
- else
- *((WIN32FILE_IOWIN*)ret) = w32fiow;
- }
- return ret;
-}
-
-voidpf ZCALLBACK win32_open64_file_func (voidpf opaque,const void* filename,int mode)
-{
- const char* mode_fopen = NULL;
- DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ;
- HANDLE hFile = NULL;
-
- win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes);
-
-#ifdef IOWIN32_USING_WINRT_API
-#ifdef UNICODE
- if ((filename!=NULL) && (dwDesiredAccess != 0))
- hFile = CreateFile2((LPCTSTR)filename, dwDesiredAccess, dwShareMode, dwCreationDisposition, NULL);
-#else
- if ((filename!=NULL) && (dwDesiredAccess != 0))
- {
- WCHAR filenameW[FILENAME_MAX + 0x200 + 1];
- MultiByteToWideChar(CP_ACP,0,(const char*)filename,-1,filenameW,FILENAME_MAX + 0x200);
- hFile = CreateFile2(filenameW, dwDesiredAccess, dwShareMode, dwCreationDisposition, NULL);
- }
-#endif
-#else
- if ((filename!=NULL) && (dwDesiredAccess != 0))
- hFile = CreateFile((LPCTSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL);
-#endif
-
- return win32_build_iowin(hFile);
-}
-
-
-voidpf ZCALLBACK win32_open64_file_funcA (voidpf opaque,const void* filename,int mode)
-{
- const char* mode_fopen = NULL;
- DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ;
- HANDLE hFile = NULL;
-
- win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes);
-
-#ifdef IOWIN32_USING_WINRT_API
- if ((filename!=NULL) && (dwDesiredAccess != 0))
- {
- WCHAR filenameW[FILENAME_MAX + 0x200 + 1];
- MultiByteToWideChar(CP_ACP,0,(const char*)filename,-1,filenameW,FILENAME_MAX + 0x200);
- hFile = CreateFile2(filenameW, dwDesiredAccess, dwShareMode, dwCreationDisposition, NULL);
- }
-#else
- if ((filename!=NULL) && (dwDesiredAccess != 0))
- hFile = CreateFileA((LPCSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL);
-#endif
-
- return win32_build_iowin(hFile);
-}
-
-
-voidpf ZCALLBACK win32_open64_file_funcW (voidpf opaque,const void* filename,int mode)
-{
- const char* mode_fopen = NULL;
- DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ;
- HANDLE hFile = NULL;
-
- win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes);
-
-#ifdef IOWIN32_USING_WINRT_API
- if ((filename!=NULL) && (dwDesiredAccess != 0))
- hFile = CreateFile2((LPCWSTR)filename, dwDesiredAccess, dwShareMode, dwCreationDisposition,NULL);
-#else
- if ((filename!=NULL) && (dwDesiredAccess != 0))
- hFile = CreateFileW((LPCWSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL);
-#endif
-
- return win32_build_iowin(hFile);
-}
-
-
-voidpf ZCALLBACK win32_open_file_func (voidpf opaque,const char* filename,int mode)
-{
- const char* mode_fopen = NULL;
- DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ;
- HANDLE hFile = NULL;
-
- win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes);
-
-#ifdef IOWIN32_USING_WINRT_API
-#ifdef UNICODE
- if ((filename!=NULL) && (dwDesiredAccess != 0))
- hFile = CreateFile2((LPCTSTR)filename, dwDesiredAccess, dwShareMode, dwCreationDisposition, NULL);
-#else
- if ((filename!=NULL) && (dwDesiredAccess != 0))
- {
- WCHAR filenameW[FILENAME_MAX + 0x200 + 1];
- MultiByteToWideChar(CP_ACP,0,(const char*)filename,-1,filenameW,FILENAME_MAX + 0x200);
- hFile = CreateFile2(filenameW, dwDesiredAccess, dwShareMode, dwCreationDisposition, NULL);
- }
-#endif
-#else
- if ((filename!=NULL) && (dwDesiredAccess != 0))
- hFile = CreateFile((LPCTSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL);
-#endif
-
- return win32_build_iowin(hFile);
-}
-
-
-uLong ZCALLBACK win32_read_file_func (voidpf opaque, voidpf stream, void* buf,uLong size)
-{
- uLong ret=0;
- HANDLE hFile = NULL;
- if (stream!=NULL)
- hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
-
- if (hFile != NULL)
- {
- if (!ReadFile(hFile, buf, size, &ret, NULL))
- {
- DWORD dwErr = GetLastError();
- if (dwErr == ERROR_HANDLE_EOF)
- dwErr = 0;
- ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
- }
- }
-
- return ret;
-}
-
-
-uLong ZCALLBACK win32_write_file_func (voidpf opaque,voidpf stream,const void* buf,uLong size)
-{
- uLong ret=0;
- HANDLE hFile = NULL;
- if (stream!=NULL)
- hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
-
- if (hFile != NULL)
- {
- if (!WriteFile(hFile, buf, size, &ret, NULL))
- {
- DWORD dwErr = GetLastError();
- if (dwErr == ERROR_HANDLE_EOF)
- dwErr = 0;
- ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
- }
- }
-
- return ret;
-}
-
-static BOOL MySetFilePointerEx(HANDLE hFile, LARGE_INTEGER pos, LARGE_INTEGER *newPos, DWORD dwMoveMethod)
-{
-#ifdef IOWIN32_USING_WINRT_API
- return SetFilePointerEx(hFile, pos, newPos, dwMoveMethod);
-#else
- LONG lHigh = pos.HighPart;
- DWORD dwNewPos = SetFilePointer(hFile, pos.LowPart, &lHigh, FILE_CURRENT);
- BOOL fOk = TRUE;
- if (dwNewPos == 0xFFFFFFFF)
- if (GetLastError() != NO_ERROR)
- fOk = FALSE;
- if ((newPos != NULL) && (fOk))
- {
- newPos->LowPart = dwNewPos;
- newPos->HighPart = lHigh;
- }
- return fOk;
-#endif
-}
-
-long ZCALLBACK win32_tell_file_func (voidpf opaque,voidpf stream)
-{
- long ret=-1;
- HANDLE hFile = NULL;
- if (stream!=NULL)
- hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
- if (hFile != NULL)
- {
- LARGE_INTEGER pos;
- pos.QuadPart = 0;
-
- if (!MySetFilePointerEx(hFile, pos, &pos, FILE_CURRENT))
- {
- DWORD dwErr = GetLastError();
- ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
- ret = -1;
- }
- else
- ret=(long)pos.LowPart;
- }
- return ret;
-}
-
-ZPOS64_T ZCALLBACK win32_tell64_file_func (voidpf opaque, voidpf stream)
-{
- ZPOS64_T ret= (ZPOS64_T)-1;
- HANDLE hFile = NULL;
- if (stream!=NULL)
- hFile = ((WIN32FILE_IOWIN*)stream)->hf;
-
- if (hFile)
- {
- LARGE_INTEGER pos;
- pos.QuadPart = 0;
-
- if (!MySetFilePointerEx(hFile, pos, &pos, FILE_CURRENT))
- {
- DWORD dwErr = GetLastError();
- ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
- ret = (ZPOS64_T)-1;
- }
- else
- ret=pos.QuadPart;
- }
- return ret;
-}
-
-
-long ZCALLBACK win32_seek_file_func (voidpf opaque,voidpf stream,uLong offset,int origin)
-{
- DWORD dwMoveMethod=0xFFFFFFFF;
- HANDLE hFile = NULL;
-
- long ret=-1;
- if (stream!=NULL)
- hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
- switch (origin)
- {
- case ZLIB_FILEFUNC_SEEK_CUR :
- dwMoveMethod = FILE_CURRENT;
- break;
- case ZLIB_FILEFUNC_SEEK_END :
- dwMoveMethod = FILE_END;
- break;
- case ZLIB_FILEFUNC_SEEK_SET :
- dwMoveMethod = FILE_BEGIN;
- break;
- default: return -1;
- }
-
- if (hFile != NULL)
- {
- LARGE_INTEGER pos;
- pos.QuadPart = offset;
- if (!MySetFilePointerEx(hFile, pos, NULL, dwMoveMethod))
- {
- DWORD dwErr = GetLastError();
- ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
- ret = -1;
- }
- else
- ret=0;
- }
- return ret;
-}
-
-long ZCALLBACK win32_seek64_file_func (voidpf opaque, voidpf stream,ZPOS64_T offset,int origin)
-{
- DWORD dwMoveMethod=0xFFFFFFFF;
- HANDLE hFile = NULL;
- long ret=-1;
-
- if (stream!=NULL)
- hFile = ((WIN32FILE_IOWIN*)stream)->hf;
-
- switch (origin)
- {
- case ZLIB_FILEFUNC_SEEK_CUR :
- dwMoveMethod = FILE_CURRENT;
- break;
- case ZLIB_FILEFUNC_SEEK_END :
- dwMoveMethod = FILE_END;
- break;
- case ZLIB_FILEFUNC_SEEK_SET :
- dwMoveMethod = FILE_BEGIN;
- break;
- default: return -1;
- }
-
- if (hFile)
- {
- LARGE_INTEGER pos;
- pos.QuadPart = offset;
- if (!MySetFilePointerEx(hFile, pos, NULL, FILE_CURRENT))
- {
- DWORD dwErr = GetLastError();
- ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
- ret = -1;
- }
- else
- ret=0;
- }
- return ret;
-}
-
-int ZCALLBACK win32_close_file_func (voidpf opaque, voidpf stream)
-{
- int ret=-1;
-
- if (stream!=NULL)
- {
- HANDLE hFile;
- hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
- if (hFile != NULL)
- {
- CloseHandle(hFile);
- ret=0;
- }
- free(stream);
- }
- return ret;
-}
-
-int ZCALLBACK win32_error_file_func (voidpf opaque,voidpf stream)
-{
- int ret=-1;
- if (stream!=NULL)
- {
- ret = ((WIN32FILE_IOWIN*)stream) -> error;
- }
- return ret;
-}
-
-void fill_win32_filefunc (zlib_filefunc_def* pzlib_filefunc_def)
-{
- pzlib_filefunc_def->zopen_file = win32_open_file_func;
- pzlib_filefunc_def->zread_file = win32_read_file_func;
- pzlib_filefunc_def->zwrite_file = win32_write_file_func;
- pzlib_filefunc_def->ztell_file = win32_tell_file_func;
- pzlib_filefunc_def->zseek_file = win32_seek_file_func;
- pzlib_filefunc_def->zclose_file = win32_close_file_func;
- pzlib_filefunc_def->zerror_file = win32_error_file_func;
- pzlib_filefunc_def->opaque = NULL;
-}
-
-void fill_win32_filefunc64(zlib_filefunc64_def* pzlib_filefunc_def)
-{
- pzlib_filefunc_def->zopen64_file = win32_open64_file_func;
- pzlib_filefunc_def->zread_file = win32_read_file_func;
- pzlib_filefunc_def->zwrite_file = win32_write_file_func;
- pzlib_filefunc_def->ztell64_file = win32_tell64_file_func;
- pzlib_filefunc_def->zseek64_file = win32_seek64_file_func;
- pzlib_filefunc_def->zclose_file = win32_close_file_func;
- pzlib_filefunc_def->zerror_file = win32_error_file_func;
- pzlib_filefunc_def->opaque = NULL;
-}
-
-
-void fill_win32_filefunc64A(zlib_filefunc64_def* pzlib_filefunc_def)
-{
- pzlib_filefunc_def->zopen64_file = win32_open64_file_funcA;
- pzlib_filefunc_def->zread_file = win32_read_file_func;
- pzlib_filefunc_def->zwrite_file = win32_write_file_func;
- pzlib_filefunc_def->ztell64_file = win32_tell64_file_func;
- pzlib_filefunc_def->zseek64_file = win32_seek64_file_func;
- pzlib_filefunc_def->zclose_file = win32_close_file_func;
- pzlib_filefunc_def->zerror_file = win32_error_file_func;
- pzlib_filefunc_def->opaque = NULL;
-}
-
-
-void fill_win32_filefunc64W(zlib_filefunc64_def* pzlib_filefunc_def)
-{
- pzlib_filefunc_def->zopen64_file = win32_open64_file_funcW;
- pzlib_filefunc_def->zread_file = win32_read_file_func;
- pzlib_filefunc_def->zwrite_file = win32_write_file_func;
- pzlib_filefunc_def->ztell64_file = win32_tell64_file_func;
- pzlib_filefunc_def->zseek64_file = win32_seek64_file_func;
- pzlib_filefunc_def->zclose_file = win32_close_file_func;
- pzlib_filefunc_def->zerror_file = win32_error_file_func;
- pzlib_filefunc_def->opaque = NULL;
-}
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/minizip/iowin32.h
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/minizip/iowin32.h b/c++/libs/zlib-1.2.8/contrib/minizip/iowin32.h
deleted file mode 100644
index 0ca0969..0000000
--- a/c++/libs/zlib-1.2.8/contrib/minizip/iowin32.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* iowin32.h -- IO base function header for compress/uncompress .zip
- Version 1.1, February 14h, 2010
- part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
-
- Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
-
- Modifications for Zip64 support
- Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
-
- For more info read MiniZip_info.txt
-
-*/
-
-#include <windows.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void fill_win32_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
-void fill_win32_filefunc64 OF((zlib_filefunc64_def* pzlib_filefunc_def));
-void fill_win32_filefunc64A OF((zlib_filefunc64_def* pzlib_filefunc_def));
-void fill_win32_filefunc64W OF((zlib_filefunc64_def* pzlib_filefunc_def));
-
-#ifdef __cplusplus
-}
-#endif
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/minizip/make_vms.com
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/minizip/make_vms.com b/c++/libs/zlib-1.2.8/contrib/minizip/make_vms.com
deleted file mode 100644
index 9ac13a9..0000000
--- a/c++/libs/zlib-1.2.8/contrib/minizip/make_vms.com
+++ /dev/null
@@ -1,25 +0,0 @@
-$ if f$search("ioapi.h_orig") .eqs. "" then copy ioapi.h ioapi.h_orig
-$ open/write zdef vmsdefs.h
-$ copy sys$input: zdef
-$ deck
-#define unix
-#define fill_zlib_filefunc64_32_def_from_filefunc32 fillzffunc64from
-#define Write_Zip64EndOfCentralDirectoryLocator Write_Zip64EoDLocator
-#define Write_Zip64EndOfCentralDirectoryRecord Write_Zip64EoDRecord
-#define Write_EndOfCentralDirectoryRecord Write_EoDRecord
-$ eod
-$ close zdef
-$ copy vmsdefs.h,ioapi.h_orig ioapi.h
-$ cc/include=[--]/prefix=all ioapi.c
-$ cc/include=[--]/prefix=all miniunz.c
-$ cc/include=[--]/prefix=all unzip.c
-$ cc/include=[--]/prefix=all minizip.c
-$ cc/include=[--]/prefix=all zip.c
-$ link miniunz,unzip,ioapi,[--]libz.olb/lib
-$ link minizip,zip,ioapi,[--]libz.olb/lib
-$ mcr []minizip test minizip_info.txt
-$ mcr []miniunz -l test.zip
-$ rename minizip_info.txt; minizip_info.txt_old
-$ mcr []miniunz test.zip
-$ delete test.zip;*
-$exit
[26/51] [partial] orc git commit: ORC-204 Update and use CMake
External Project to build C++ compression libraries.
Posted by om...@apache.org.
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/FAQ
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/FAQ b/c++/libs/zlib-1.2.8/FAQ
deleted file mode 100644
index 99b7cf9..0000000
--- a/c++/libs/zlib-1.2.8/FAQ
+++ /dev/null
@@ -1,368 +0,0 @@
-
- Frequently Asked Questions about zlib
-
-
-If your question is not there, please check the zlib home page
-http://zlib.net/ which may have more recent information.
-The lastest zlib FAQ is at http://zlib.net/zlib_faq.html
-
-
- 1. Is zlib Y2K-compliant?
-
- Yes. zlib doesn't handle dates.
-
- 2. Where can I get a Windows DLL version?
-
- The zlib sources can be compiled without change to produce a DLL. See the
- file win32/DLL_FAQ.txt in the zlib distribution. Pointers to the
- precompiled DLL are found in the zlib web site at http://zlib.net/ .
-
- 3. Where can I get a Visual Basic interface to zlib?
-
- See
- * http://marknelson.us/1997/01/01/zlib-engine/
- * win32/DLL_FAQ.txt in the zlib distribution
-
- 4. compress() returns Z_BUF_ERROR.
-
- Make sure that before the call of compress(), the length of the compressed
- buffer is equal to the available size of the compressed buffer and not
- zero. For Visual Basic, check that this parameter is passed by reference
- ("as any"), not by value ("as long").
-
- 5. deflate() or inflate() returns Z_BUF_ERROR.
-
- Before making the call, make sure that avail_in and avail_out are not zero.
- When setting the parameter flush equal to Z_FINISH, also make sure that
- avail_out is big enough to allow processing all pending input. Note that a
- Z_BUF_ERROR is not fatal--another call to deflate() or inflate() can be
- made with more input or output space. A Z_BUF_ERROR may in fact be
- unavoidable depending on how the functions are used, since it is not
- possible to tell whether or not there is more output pending when
- strm.avail_out returns with zero. See http://zlib.net/zlib_how.html for a
- heavily annotated example.
-
- 6. Where's the zlib documentation (man pages, etc.)?
-
- It's in zlib.h . Examples of zlib usage are in the files test/example.c
- and test/minigzip.c, with more in examples/ .
-
- 7. Why don't you use GNU autoconf or libtool or ...?
-
- Because we would like to keep zlib as a very small and simple package.
- zlib is rather portable and doesn't need much configuration.
-
- 8. I found a bug in zlib.
-
- Most of the time, such problems are due to an incorrect usage of zlib.
- Please try to reproduce the problem with a small program and send the
- corresponding source to us at zlib@gzip.org . Do not send multi-megabyte
- data files without prior agreement.
-
- 9. Why do I get "undefined reference to gzputc"?
-
- If "make test" produces something like
-
- example.o(.text+0x154): undefined reference to `gzputc'
-
- check that you don't have old files libz.* in /usr/lib, /usr/local/lib or
- /usr/X11R6/lib. Remove any old versions, then do "make install".
-
-10. I need a Delphi interface to zlib.
-
- See the contrib/delphi directory in the zlib distribution.
-
-11. Can zlib handle .zip archives?
-
- Not by itself, no. See the directory contrib/minizip in the zlib
- distribution.
-
-12. Can zlib handle .Z files?
-
- No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt
- the code of uncompress on your own.
-
-13. How can I make a Unix shared library?
-
- By default a shared (and a static) library is built for Unix. So:
-
- make distclean
- ./configure
- make
-
-14. How do I install a shared zlib library on Unix?
-
- After the above, then:
-
- make install
-
- However, many flavors of Unix come with a shared zlib already installed.
- Before going to the trouble of compiling a shared version of zlib and
- trying to install it, you may want to check if it's already there! If you
- can #include <zlib.h>, it's there. The -lz option will probably link to
- it. You can check the version at the top of zlib.h or with the
- ZLIB_VERSION symbol defined in zlib.h .
-
-15. I have a question about OttoPDF.
-
- We are not the authors of OttoPDF. The real author is on the OttoPDF web
- site: Joel Hainley, jhainley@myndkryme.com.
-
-16. Can zlib decode Flate data in an Adobe PDF file?
-
- Yes. See http://www.pdflib.com/ . To modify PDF forms, see
- http://sourceforge.net/projects/acroformtool/ .
-
-17. Why am I getting this "register_frame_info not found" error on Solaris?
-
- After installing zlib 1.1.4 on Solaris 2.6, running applications using zlib
- generates an error such as:
-
- ld.so.1: rpm: fatal: relocation error: file /usr/local/lib/libz.so:
- symbol __register_frame_info: referenced symbol not found
-
- The symbol __register_frame_info is not part of zlib, it is generated by
- the C compiler (cc or gcc). You must recompile applications using zlib
- which have this problem. This problem is specific to Solaris. See
- http://www.sunfreeware.com for Solaris versions of zlib and applications
- using zlib.
-
-18. Why does gzip give an error on a file I make with compress/deflate?
-
- The compress and deflate functions produce data in the zlib format, which
- is different and incompatible with the gzip format. The gz* functions in
- zlib on the other hand use the gzip format. Both the zlib and gzip formats
- use the same compressed data format internally, but have different headers
- and trailers around the compressed data.
-
-19. Ok, so why are there two different formats?
-
- The gzip format was designed to retain the directory information about a
- single file, such as the name and last modification date. The zlib format
- on the other hand was designed for in-memory and communication channel
- applications, and has a much more compact header and trailer and uses a
- faster integrity check than gzip.
-
-20. Well that's nice, but how do I make a gzip file in memory?
-
- You can request that deflate write the gzip format instead of the zlib
- format using deflateInit2(). You can also request that inflate decode the
- gzip format using inflateInit2(). Read zlib.h for more details.
-
-21. Is zlib thread-safe?
-
- Yes. However any library routines that zlib uses and any application-
- provided memory allocation routines must also be thread-safe. zlib's gz*
- functions use stdio library routines, and most of zlib's functions use the
- library memory allocation routines by default. zlib's *Init* functions
- allow for the application to provide custom memory allocation routines.
-
- Of course, you should only operate on any given zlib or gzip stream from a
- single thread at a time.
-
-22. Can I use zlib in my commercial application?
-
- Yes. Please read the license in zlib.h.
-
-23. Is zlib under the GNU license?
-
- No. Please read the license in zlib.h.
-
-24. The license says that altered source versions must be "plainly marked". So
- what exactly do I need to do to meet that requirement?
-
- You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In
- particular, the final version number needs to be changed to "f", and an
- identification string should be appended to ZLIB_VERSION. Version numbers
- x.x.x.f are reserved for modifications to zlib by others than the zlib
- maintainers. For example, if the version of the base zlib you are altering
- is "1.2.3.4", then in zlib.h you should change ZLIB_VERNUM to 0x123f, and
- ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3". You can also
- update the version strings in deflate.c and inftrees.c.
-
- For altered source distributions, you should also note the origin and
- nature of the changes in zlib.h, as well as in ChangeLog and README, along
- with the dates of the alterations. The origin should include at least your
- name (or your company's name), and an email address to contact for help or
- issues with the library.
-
- Note that distributing a compiled zlib library along with zlib.h and
- zconf.h is also a source distribution, and so you should change
- ZLIB_VERSION and ZLIB_VERNUM and note the origin and nature of the changes
- in zlib.h as you would for a full source distribution.
-
-25. Will zlib work on a big-endian or little-endian architecture, and can I
- exchange compressed data between them?
-
- Yes and yes.
-
-26. Will zlib work on a 64-bit machine?
-
- Yes. It has been tested on 64-bit machines, and has no dependence on any
- data types being limited to 32-bits in length. If you have any
- difficulties, please provide a complete problem report to zlib@gzip.org
-
-27. Will zlib decompress data from the PKWare Data Compression Library?
-
- No. The PKWare DCL uses a completely different compressed data format than
- does PKZIP and zlib. However, you can look in zlib's contrib/blast
- directory for a possible solution to your problem.
-
-28. Can I access data randomly in a compressed stream?
-
- No, not without some preparation. If when compressing you periodically use
- Z_FULL_FLUSH, carefully write all the pending data at those points, and
- keep an index of those locations, then you can start decompression at those
- points. You have to be careful to not use Z_FULL_FLUSH too often, since it
- can significantly degrade compression. Alternatively, you can scan a
- deflate stream once to generate an index, and then use that index for
- random access. See examples/zran.c .
-
-29. Does zlib work on MVS, OS/390, CICS, etc.?
-
- It has in the past, but we have not heard of any recent evidence. There
- were working ports of zlib 1.1.4 to MVS, but those links no longer work.
- If you know of recent, successful applications of zlib on these operating
- systems, please let us know. Thanks.
-
-30. Is there some simpler, easier to read version of inflate I can look at to
- understand the deflate format?
-
- First off, you should read RFC 1951. Second, yes. Look in zlib's
- contrib/puff directory.
-
-31. Does zlib infringe on any patents?
-
- As far as we know, no. In fact, that was originally the whole point behind
- zlib. Look here for some more information:
-
- http://www.gzip.org/#faq11
-
-32. Can zlib work with greater than 4 GB of data?
-
- Yes. inflate() and deflate() will process any amount of data correctly.
- Each call of inflate() or deflate() is limited to input and output chunks
- of the maximum value that can be stored in the compiler's "unsigned int"
- type, but there is no limit to the number of chunks. Note however that the
- strm.total_in and strm_total_out counters may be limited to 4 GB. These
- counters are provided as a convenience and are not used internally by
- inflate() or deflate(). The application can easily set up its own counters
- updated after each call of inflate() or deflate() to count beyond 4 GB.
- compress() and uncompress() may be limited to 4 GB, since they operate in a
- single call. gzseek() and gztell() may be limited to 4 GB depending on how
- zlib is compiled. See the zlibCompileFlags() function in zlib.h.
-
- The word "may" appears several times above since there is a 4 GB limit only
- if the compiler's "long" type is 32 bits. If the compiler's "long" type is
- 64 bits, then the limit is 16 exabytes.
-
-33. Does zlib have any security vulnerabilities?
-
- The only one that we are aware of is potentially in gzprintf(). If zlib is
- compiled to use sprintf() or vsprintf(), then there is no protection
- against a buffer overflow of an 8K string space (or other value as set by
- gzbuffer()), other than the caller of gzprintf() assuring that the output
- will not exceed 8K. On the other hand, if zlib is compiled to use
- snprintf() or vsnprintf(), which should normally be the case, then there is
- no vulnerability. The ./configure script will display warnings if an
- insecure variation of sprintf() will be used by gzprintf(). Also the
- zlibCompileFlags() function will return information on what variant of
- sprintf() is used by gzprintf().
-
- If you don't have snprintf() or vsnprintf() and would like one, you can
- find a portable implementation here:
-
- http://www.ijs.si/software/snprintf/
-
- Note that you should be using the most recent version of zlib. Versions
- 1.1.3 and before were subject to a double-free vulnerability, and versions
- 1.2.1 and 1.2.2 were subject to an access exception when decompressing
- invalid compressed data.
-
-34. Is there a Java version of zlib?
-
- Probably what you want is to use zlib in Java. zlib is already included
- as part of the Java SDK in the java.util.zip package. If you really want
- a version of zlib written in the Java language, look on the zlib home
- page for links: http://zlib.net/ .
-
-35. I get this or that compiler or source-code scanner warning when I crank it
- up to maximally-pedantic. Can't you guys write proper code?
-
- Many years ago, we gave up attempting to avoid warnings on every compiler
- in the universe. It just got to be a waste of time, and some compilers
- were downright silly as well as contradicted each other. So now, we simply
- make sure that the code always works.
-
-36. Valgrind (or some similar memory access checker) says that deflate is
- performing a conditional jump that depends on an uninitialized value.
- Isn't that a bug?
-
- No. That is intentional for performance reasons, and the output of deflate
- is not affected. This only started showing up recently since zlib 1.2.x
- uses malloc() by default for allocations, whereas earlier versions used
- calloc(), which zeros out the allocated memory. Even though the code was
- correct, versions 1.2.4 and later was changed to not stimulate these
- checkers.
-
-37. Will zlib read the (insert any ancient or arcane format here) compressed
- data format?
-
- Probably not. Look in the comp.compression FAQ for pointers to various
- formats and associated software.
-
-38. How can I encrypt/decrypt zip files with zlib?
-
- zlib doesn't support encryption. The original PKZIP encryption is very
- weak and can be broken with freely available programs. To get strong
- encryption, use GnuPG, http://www.gnupg.org/ , which already includes zlib
- compression. For PKZIP compatible "encryption", look at
- http://www.info-zip.org/
-
-39. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings?
-
- "gzip" is the gzip format, and "deflate" is the zlib format. They should
- probably have called the second one "zlib" instead to avoid confusion with
- the raw deflate compressed data format. While the HTTP 1.1 RFC 2616
- correctly points to the zlib specification in RFC 1950 for the "deflate"
- transfer encoding, there have been reports of servers and browsers that
- incorrectly produce or expect raw deflate data per the deflate
- specification in RFC 1951, most notably Microsoft. So even though the
- "deflate" transfer encoding using the zlib format would be the more
- efficient approach (and in fact exactly what the zlib format was designed
- for), using the "gzip" transfer encoding is probably more reliable due to
- an unfortunate choice of name on the part of the HTTP 1.1 authors.
-
- Bottom line: use the gzip format for HTTP 1.1 encoding.
-
-40. Does zlib support the new "Deflate64" format introduced by PKWare?
-
- No. PKWare has apparently decided to keep that format proprietary, since
- they have not documented it as they have previous compression formats. In
- any case, the compression improvements are so modest compared to other more
- modern approaches, that it's not worth the effort to implement.
-
-41. I'm having a problem with the zip functions in zlib, can you help?
-
- There are no zip functions in zlib. You are probably using minizip by
- Giles Vollant, which is found in the contrib directory of zlib. It is not
- part of zlib. In fact none of the stuff in contrib is part of zlib. The
- files in there are not supported by the zlib authors. You need to contact
- the authors of the respective contribution for help.
-
-42. The match.asm code in contrib is under the GNU General Public License.
- Since it's part of zlib, doesn't that mean that all of zlib falls under the
- GNU GPL?
-
- No. The files in contrib are not part of zlib. They were contributed by
- other authors and are provided as a convenience to the user within the zlib
- distribution. Each item in contrib has its own license.
-
-43. Is zlib subject to export controls? What is its ECCN?
-
- zlib is not subject to export controls, and so is classified as EAR99.
-
-44. Can you please sign these lengthy legal documents and fax them back to us
- so that we can use your software in our product?
-
- No. Go away. Shoo.
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/INDEX
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/INDEX b/c++/libs/zlib-1.2.8/INDEX
deleted file mode 100644
index 2ba0641..0000000
--- a/c++/libs/zlib-1.2.8/INDEX
+++ /dev/null
@@ -1,68 +0,0 @@
-CMakeLists.txt cmake build file
-ChangeLog history of changes
-FAQ Frequently Asked Questions about zlib
-INDEX this file
-Makefile dummy Makefile that tells you to ./configure
-Makefile.in template for Unix Makefile
-README guess what
-configure configure script for Unix
-make_vms.com makefile for VMS
-test/example.c zlib usages examples for build testing
-test/minigzip.c minimal gzip-like functionality for build testing
-test/infcover.c inf*.c code coverage for build coverage testing
-treebuild.xml XML description of source file dependencies
-zconf.h.cmakein zconf.h template for cmake
-zconf.h.in zconf.h template for configure
-zlib.3 Man page for zlib
-zlib.3.pdf Man page in PDF format
-zlib.map Linux symbol information
-zlib.pc.in Template for pkg-config descriptor
-zlib.pc.cmakein zlib.pc template for cmake
-zlib2ansi perl script to convert source files for C++ compilation
-
-amiga/ makefiles for Amiga SAS C
-as400/ makefiles for AS/400
-doc/ documentation for formats and algorithms
-msdos/ makefiles for MSDOS
-nintendods/ makefile for Nintendo DS
-old/ makefiles for various architectures and zlib documentation
- files that have not yet been updated for zlib 1.2.x
-qnx/ makefiles for QNX
-watcom/ makefiles for OpenWatcom
-win32/ makefiles for Windows
-
- zlib public header files (required for library use):
-zconf.h
-zlib.h
-
- private source files used to build the zlib library:
-adler32.c
-compress.c
-crc32.c
-crc32.h
-deflate.c
-deflate.h
-gzclose.c
-gzguts.h
-gzlib.c
-gzread.c
-gzwrite.c
-infback.c
-inffast.c
-inffast.h
-inffixed.h
-inflate.c
-inflate.h
-inftrees.c
-inftrees.h
-trees.c
-trees.h
-uncompr.c
-zutil.c
-zutil.h
-
- source files for sample programs
-See examples/README.examples
-
- unsupported contributions by third parties
-See contrib/README.contrib
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/Makefile
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/Makefile b/c++/libs/zlib-1.2.8/Makefile
deleted file mode 100644
index 6bba86c..0000000
--- a/c++/libs/zlib-1.2.8/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-all:
- -@echo "Please use ./configure first. Thank you."
-
-distclean:
- make -f Makefile.in distclean
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/Makefile.in
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/Makefile.in b/c++/libs/zlib-1.2.8/Makefile.in
deleted file mode 100644
index c61aa30..0000000
--- a/c++/libs/zlib-1.2.8/Makefile.in
+++ /dev/null
@@ -1,288 +0,0 @@
-# Makefile for zlib
-# Copyright (C) 1995-2013 Jean-loup Gailly, Mark Adler
-# For conditions of distribution and use, see copyright notice in zlib.h
-
-# To compile and test, type:
-# ./configure; make test
-# Normally configure builds both a static and a shared library.
-# If you want to build just a static library, use: ./configure --static
-
-# To use the asm code, type:
-# cp contrib/asm?86/match.S ./match.S
-# make LOC=-DASMV OBJA=match.o
-
-# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type:
-# make install
-# To install in $HOME instead of /usr/local, use:
-# make install prefix=$HOME
-
-CC=cc
-
-CFLAGS=-O
-#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
-#CFLAGS=-g -DDEBUG
-#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
-# -Wstrict-prototypes -Wmissing-prototypes
-
-SFLAGS=-O
-LDFLAGS=
-TEST_LDFLAGS=-L. libz.a
-LDSHARED=$(CC)
-CPP=$(CC) -E
-
-STATICLIB=libz.a
-SHAREDLIB=libz.so
-SHAREDLIBV=libz.so.1.2.8
-SHAREDLIBM=libz.so.1
-LIBS=$(STATICLIB) $(SHAREDLIBV)
-
-AR=ar
-ARFLAGS=rc
-RANLIB=ranlib
-LDCONFIG=ldconfig
-LDSHAREDLIBC=-lc
-TAR=tar
-SHELL=/bin/sh
-EXE=
-
-prefix = /usr/local
-exec_prefix = ${prefix}
-libdir = ${exec_prefix}/lib
-sharedlibdir = ${libdir}
-includedir = ${prefix}/include
-mandir = ${prefix}/share/man
-man3dir = ${mandir}/man3
-pkgconfigdir = ${libdir}/pkgconfig
-
-OBJZ = adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o
-OBJG = compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o
-OBJC = $(OBJZ) $(OBJG)
-
-PIC_OBJZ = adler32.lo crc32.lo deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo
-PIC_OBJG = compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo
-PIC_OBJC = $(PIC_OBJZ) $(PIC_OBJG)
-
-# to use the asm code: make OBJA=match.o, PIC_OBJA=match.lo
-OBJA =
-PIC_OBJA =
-
-OBJS = $(OBJC) $(OBJA)
-
-PIC_OBJS = $(PIC_OBJC) $(PIC_OBJA)
-
-all: static shared
-
-static: example$(EXE) minigzip$(EXE)
-
-shared: examplesh$(EXE) minigzipsh$(EXE)
-
-all64: example64$(EXE) minigzip64$(EXE)
-
-check: test
-
-test: all teststatic testshared
-
-teststatic: static
- @TMPST=tmpst_$$; \
- if echo hello world | ./minigzip | ./minigzip -d && ./example $$TMPST ; then \
- echo ' *** zlib test OK ***'; \
- else \
- echo ' *** zlib test FAILED ***'; false; \
- fi; \
- rm -f $$TMPST
-
-testshared: shared
- @LD_LIBRARY_PATH=`pwd`:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
- LD_LIBRARYN32_PATH=`pwd`:$(LD_LIBRARYN32_PATH) ; export LD_LIBRARYN32_PATH; \
- DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \
- SHLIB_PATH=`pwd`:$(SHLIB_PATH) ; export SHLIB_PATH; \
- TMPSH=tmpsh_$$; \
- if echo hello world | ./minigzipsh | ./minigzipsh -d && ./examplesh $$TMPSH; then \
- echo ' *** zlib shared test OK ***'; \
- else \
- echo ' *** zlib shared test FAILED ***'; false; \
- fi; \
- rm -f $$TMPSH
-
-test64: all64
- @TMP64=tmp64_$$; \
- if echo hello world | ./minigzip64 | ./minigzip64 -d && ./example64 $$TMP64; then \
- echo ' *** zlib 64-bit test OK ***'; \
- else \
- echo ' *** zlib 64-bit test FAILED ***'; false; \
- fi; \
- rm -f $$TMP64
-
-infcover.o: test/infcover.c zlib.h zconf.h
- $(CC) $(CFLAGS) -I. -c -o $@ test/infcover.c
-
-infcover: infcover.o libz.a
- $(CC) $(CFLAGS) -o $@ infcover.o libz.a
-
-cover: infcover
- rm -f *.gcda
- ./infcover
- gcov inf*.c
-
-libz.a: $(OBJS)
- $(AR) $(ARFLAGS) $@ $(OBJS)
- -@ ($(RANLIB) $@ || true) >/dev/null 2>&1
-
-match.o: match.S
- $(CPP) match.S > _match.s
- $(CC) -c _match.s
- mv _match.o match.o
- rm -f _match.s
-
-match.lo: match.S
- $(CPP) match.S > _match.s
- $(CC) -c -fPIC _match.s
- mv _match.o match.lo
- rm -f _match.s
-
-example.o: test/example.c zlib.h zconf.h
- $(CC) $(CFLAGS) -I. -c -o $@ test/example.c
-
-minigzip.o: test/minigzip.c zlib.h zconf.h
- $(CC) $(CFLAGS) -I. -c -o $@ test/minigzip.c
-
-example64.o: test/example.c zlib.h zconf.h
- $(CC) $(CFLAGS) -I. -D_FILE_OFFSET_BITS=64 -c -o $@ test/example.c
-
-minigzip64.o: test/minigzip.c zlib.h zconf.h
- $(CC) $(CFLAGS) -I. -D_FILE_OFFSET_BITS=64 -c -o $@ test/minigzip.c
-
-.SUFFIXES: .lo
-
-.c.lo:
- -@mkdir objs 2>/dev/null || test -d objs
- $(CC) $(SFLAGS) -DPIC -c -o objs/$*.o $<
- -@mv objs/$*.o $@
-
-placebo $(SHAREDLIBV): $(PIC_OBJS) libz.a
- $(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) $(LDSHAREDLIBC) $(LDFLAGS)
- rm -f $(SHAREDLIB) $(SHAREDLIBM)
- ln -s $@ $(SHAREDLIB)
- ln -s $@ $(SHAREDLIBM)
- -@rmdir objs
-
-example$(EXE): example.o $(STATICLIB)
- $(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS)
-
-minigzip$(EXE): minigzip.o $(STATICLIB)
- $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS)
-
-examplesh$(EXE): example.o $(SHAREDLIBV)
- $(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV)
-
-minigzipsh$(EXE): minigzip.o $(SHAREDLIBV)
- $(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV)
-
-example64$(EXE): example64.o $(STATICLIB)
- $(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS)
-
-minigzip64$(EXE): minigzip64.o $(STATICLIB)
- $(CC) $(CFLAGS) -o $@ minigzip64.o $(TEST_LDFLAGS)
-
-install-libs: $(LIBS)
- -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
- -@if [ ! -d $(DESTDIR)$(libdir) ]; then mkdir -p $(DESTDIR)$(libdir); fi
- -@if [ ! -d $(DESTDIR)$(sharedlibdir) ]; then mkdir -p $(DESTDIR)$(sharedlibdir); fi
- -@if [ ! -d $(DESTDIR)$(man3dir) ]; then mkdir -p $(DESTDIR)$(man3dir); fi
- -@if [ ! -d $(DESTDIR)$(pkgconfigdir) ]; then mkdir -p $(DESTDIR)$(pkgconfigdir); fi
- cp $(STATICLIB) $(DESTDIR)$(libdir)
- chmod 644 $(DESTDIR)$(libdir)/$(STATICLIB)
- -@($(RANLIB) $(DESTDIR)$(libdir)/libz.a || true) >/dev/null 2>&1
- -@if test -n "$(SHAREDLIBV)"; then \
- cp $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir); \
- echo "cp $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)"; \
- chmod 755 $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV); \
- echo "chmod 755 $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV)"; \
- rm -f $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \
- ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB); \
- ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \
- ($(LDCONFIG) || true) >/dev/null 2>&1; \
- fi
- cp zlib.3 $(DESTDIR)$(man3dir)
- chmod 644 $(DESTDIR)$(man3dir)/zlib.3
- cp zlib.pc $(DESTDIR)$(pkgconfigdir)
- chmod 644 $(DESTDIR)$(pkgconfigdir)/zlib.pc
-# The ranlib in install is needed on NeXTSTEP which checks file times
-# ldconfig is for Linux
-
-install: install-libs
- -@if [ ! -d $(DESTDIR)$(includedir) ]; then mkdir -p $(DESTDIR)$(includedir); fi
- cp zlib.h zconf.h $(DESTDIR)$(includedir)
- chmod 644 $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h
-
-uninstall:
- cd $(DESTDIR)$(includedir) && rm -f zlib.h zconf.h
- cd $(DESTDIR)$(libdir) && rm -f libz.a; \
- if test -n "$(SHAREDLIBV)" -a -f $(SHAREDLIBV); then \
- rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \
- fi
- cd $(DESTDIR)$(man3dir) && rm -f zlib.3
- cd $(DESTDIR)$(pkgconfigdir) && rm -f zlib.pc
-
-docs: zlib.3.pdf
-
-zlib.3.pdf: zlib.3
- groff -mandoc -f H -T ps zlib.3 | ps2pdf - zlib.3.pdf
-
-zconf.h.cmakein: zconf.h.in
- -@ TEMPFILE=zconfh_$$; \
- echo "/#define ZCONF_H/ a\\\\\n#cmakedefine Z_PREFIX\\\\\n#cmakedefine Z_HAVE_UNISTD_H\n" >> $$TEMPFILE &&\
- sed -f $$TEMPFILE zconf.h.in > zconf.h.cmakein &&\
- touch -r zconf.h.in zconf.h.cmakein &&\
- rm $$TEMPFILE
-
-zconf: zconf.h.in
- cp -p zconf.h.in zconf.h
-
-mostlyclean: clean
-clean:
- rm -f *.o *.lo *~ \
- example$(EXE) minigzip$(EXE) examplesh$(EXE) minigzipsh$(EXE) \
- example64$(EXE) minigzip64$(EXE) \
- infcover \
- libz.* foo.gz so_locations \
- _match.s maketree contrib/infback9/*.o
- rm -rf objs
- rm -f *.gcda *.gcno *.gcov
- rm -f contrib/infback9/*.gcda contrib/infback9/*.gcno contrib/infback9/*.gcov
-
-maintainer-clean: distclean
-distclean: clean zconf zconf.h.cmakein docs
- rm -f Makefile zlib.pc configure.log
- -@rm -f .DS_Store
- -@printf 'all:\n\t-@echo "Please use ./configure first. Thank you."\n' > Makefile
- -@printf '\ndistclean:\n\tmake -f Makefile.in distclean\n' >> Makefile
- -@touch -r Makefile.in Makefile
-
-tags:
- etags *.[ch]
-
-depend:
- makedepend -- $(CFLAGS) -- *.[ch]
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-adler32.o zutil.o: zutil.h zlib.h zconf.h
-gzclose.o gzlib.o gzread.o gzwrite.o: zlib.h zconf.h gzguts.h
-compress.o example.o minigzip.o uncompr.o: zlib.h zconf.h
-crc32.o: zutil.h zlib.h zconf.h crc32.h
-deflate.o: deflate.h zutil.h zlib.h zconf.h
-infback.o inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inffixed.h
-inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inftrees.o: zutil.h zlib.h zconf.h inftrees.h
-trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
-
-adler32.lo zutil.lo: zutil.h zlib.h zconf.h
-gzclose.lo gzlib.lo gzread.lo gzwrite.lo: zlib.h zconf.h gzguts.h
-compress.lo example.lo minigzip.lo uncompr.lo: zlib.h zconf.h
-crc32.lo: zutil.h zlib.h zconf.h crc32.h
-deflate.lo: deflate.h zutil.h zlib.h zconf.h
-infback.lo inflate.lo: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inffixed.h
-inffast.lo: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inftrees.lo: zutil.h zlib.h zconf.h inftrees.h
-trees.lo: deflate.h zutil.h zlib.h zconf.h trees.h
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/README
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/README b/c++/libs/zlib-1.2.8/README
deleted file mode 100644
index 5ca9d12..0000000
--- a/c++/libs/zlib-1.2.8/README
+++ /dev/null
@@ -1,115 +0,0 @@
-ZLIB DATA COMPRESSION LIBRARY
-
-zlib 1.2.8 is a general purpose data compression library. All the code is
-thread safe. The data format used by the zlib library is described by RFCs
-(Request for Comments) 1950 to 1952 in the files
-http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and
-rfc1952 (gzip format).
-
-All functions of the compression library are documented in the file zlib.h
-(volunteer to write man pages welcome, contact zlib@gzip.org). A usage example
-of the library is given in the file test/example.c which also tests that
-the library is working correctly. Another example is given in the file
-test/minigzip.c. The compression library itself is composed of all source
-files in the root directory.
-
-To compile all files and run the test program, follow the instructions given at
-the top of Makefile.in. In short "./configure; make test", and if that goes
-well, "make install" should work for most flavors of Unix. For Windows, use
-one of the special makefiles in win32/ or contrib/vstudio/ . For VMS, use
-make_vms.com.
-
-Questions about zlib should be sent to <zl...@gzip.org>, or to Gilles Vollant
-<in...@winimage.com> for the Windows DLL version. The zlib home page is
-http://zlib.net/ . Before reporting a problem, please check this site to
-verify that you have the latest version of zlib; otherwise get the latest
-version and check whether the problem still exists or not.
-
-PLEASE read the zlib FAQ http://zlib.net/zlib_faq.html before asking for help.
-
-Mark Nelson <ma...@ieee.org> wrote an article about zlib for the Jan. 1997
-issue of Dr. Dobb's Journal; a copy of the article is available at
-http://marknelson.us/1997/01/01/zlib-engine/ .
-
-The changes made in version 1.2.8 are documented in the file ChangeLog.
-
-Unsupported third party contributions are provided in directory contrib/ .
-
-zlib is available in Java using the java.util.zip package, documented at
-http://java.sun.com/developer/technicalArticles/Programming/compression/ .
-
-A Perl interface to zlib written by Paul Marquess <pm...@cpan.org> is available
-at CPAN (Comprehensive Perl Archive Network) sites, including
-http://search.cpan.org/~pmqs/IO-Compress-Zlib/ .
-
-A Python interface to zlib written by A.M. Kuchling <am...@amk.ca> is
-available in Python 1.5 and later versions, see
-http://docs.python.org/library/zlib.html .
-
-zlib is built into tcl: http://wiki.tcl.tk/4610 .
-
-An experimental package to read and write files in .zip format, written on top
-of zlib by Gilles Vollant <in...@winimage.com>, is available in the
-contrib/minizip directory of zlib.
-
-
-Notes for some targets:
-
-- For Windows DLL versions, please see win32/DLL_FAQ.txt
-
-- For 64-bit Irix, deflate.c must be compiled without any optimization. With
- -O, one libpng test fails. The test works in 32 bit mode (with the -n32
- compiler flag). The compiler bug has been reported to SGI.
-
-- zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1 it works
- when compiled with cc.
-
-- On Digital Unix 4.0D (formely OSF/1) on AlphaServer, the cc option -std1 is
- necessary to get gzprintf working correctly. This is done by configure.
-
-- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with
- other compilers. Use "make test" to check your compiler.
-
-- gzdopen is not supported on RISCOS or BEOS.
-
-- For PalmOs, see http://palmzlib.sourceforge.net/
-
-
-Acknowledgments:
-
- The deflate format used by zlib was defined by Phil Katz. The deflate and
- zlib specifications were written by L. Peter Deutsch. Thanks to all the
- people who reported problems and suggested various improvements in zlib; they
- are too numerous to cite here.
-
-Copyright notice:
-
- (C) 1995-2013 Jean-loup Gailly and Mark Adler
-
- This software is provided 'as-is', without any express or implied
- warranty. In no event will the authors be held liable for any damages
- arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source distribution.
-
- Jean-loup Gailly Mark Adler
- jloup@gzip.org madler@alumni.caltech.edu
-
-If you use the zlib library in a product, we would appreciate *not* receiving
-lengthy legal documents to sign. The sources are provided for free but without
-warranty of any kind. The library has been entirely written by Jean-loup
-Gailly and Mark Adler; it does not include third-party code.
-
-If you redistribute modified sources, we would appreciate that you include in
-the file ChangeLog history information documenting your changes. Please read
-the FAQ for more information on the distribution of modified source versions.
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/adler32.c
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/adler32.c b/c++/libs/zlib-1.2.8/adler32.c
deleted file mode 100644
index a868f07..0000000
--- a/c++/libs/zlib-1.2.8/adler32.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/* adler32.c -- compute the Adler-32 checksum of a data stream
- * Copyright (C) 1995-2011 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id$ */
-
-#include "zutil.h"
-
-#define local static
-
-local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2));
-
-#define BASE 65521 /* largest prime smaller than 65536 */
-#define NMAX 5552
-/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
-
-#define DO1(buf,i) {adler += (buf)[i]; sum2 += adler;}
-#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1);
-#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2);
-#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4);
-#define DO16(buf) DO8(buf,0); DO8(buf,8);
-
-/* use NO_DIVIDE if your processor does not do division in hardware --
- try it both ways to see which is faster */
-#ifdef NO_DIVIDE
-/* note that this assumes BASE is 65521, where 65536 % 65521 == 15
- (thank you to John Reiser for pointing this out) */
-# define CHOP(a) \
- do { \
- unsigned long tmp = a >> 16; \
- a &= 0xffffUL; \
- a += (tmp << 4) - tmp; \
- } while (0)
-# define MOD28(a) \
- do { \
- CHOP(a); \
- if (a >= BASE) a -= BASE; \
- } while (0)
-# define MOD(a) \
- do { \
- CHOP(a); \
- MOD28(a); \
- } while (0)
-# define MOD63(a) \
- do { /* this assumes a is not negative */ \
- z_off64_t tmp = a >> 32; \
- a &= 0xffffffffL; \
- a += (tmp << 8) - (tmp << 5) + tmp; \
- tmp = a >> 16; \
- a &= 0xffffL; \
- a += (tmp << 4) - tmp; \
- tmp = a >> 16; \
- a &= 0xffffL; \
- a += (tmp << 4) - tmp; \
- if (a >= BASE) a -= BASE; \
- } while (0)
-#else
-# define MOD(a) a %= BASE
-# define MOD28(a) a %= BASE
-# define MOD63(a) a %= BASE
-#endif
-
-/* ========================================================================= */
-uLong ZEXPORT adler32(adler, buf, len)
- uLong adler;
- const Bytef *buf;
- uInt len;
-{
- unsigned long sum2;
- unsigned n;
-
- /* split Adler-32 into component sums */
- sum2 = (adler >> 16) & 0xffff;
- adler &= 0xffff;
-
- /* in case user likes doing a byte at a time, keep it fast */
- if (len == 1) {
- adler += buf[0];
- if (adler >= BASE)
- adler -= BASE;
- sum2 += adler;
- if (sum2 >= BASE)
- sum2 -= BASE;
- return adler | (sum2 << 16);
- }
-
- /* initial Adler-32 value (deferred check for len == 1 speed) */
- if (buf == Z_NULL)
- return 1L;
-
- /* in case short lengths are provided, keep it somewhat fast */
- if (len < 16) {
- while (len--) {
- adler += *buf++;
- sum2 += adler;
- }
- if (adler >= BASE)
- adler -= BASE;
- MOD28(sum2); /* only added so many BASE's */
- return adler | (sum2 << 16);
- }
-
- /* do length NMAX blocks -- requires just one modulo operation */
- while (len >= NMAX) {
- len -= NMAX;
- n = NMAX / 16; /* NMAX is divisible by 16 */
- do {
- DO16(buf); /* 16 sums unrolled */
- buf += 16;
- } while (--n);
- MOD(adler);
- MOD(sum2);
- }
-
- /* do remaining bytes (less than NMAX, still just one modulo) */
- if (len) { /* avoid modulos if none remaining */
- while (len >= 16) {
- len -= 16;
- DO16(buf);
- buf += 16;
- }
- while (len--) {
- adler += *buf++;
- sum2 += adler;
- }
- MOD(adler);
- MOD(sum2);
- }
-
- /* return recombined sums */
- return adler | (sum2 << 16);
-}
-
-/* ========================================================================= */
-local uLong adler32_combine_(adler1, adler2, len2)
- uLong adler1;
- uLong adler2;
- z_off64_t len2;
-{
- unsigned long sum1;
- unsigned long sum2;
- unsigned rem;
-
- /* for negative len, return invalid adler32 as a clue for debugging */
- if (len2 < 0)
- return 0xffffffffUL;
-
- /* the derivation of this formula is left as an exercise for the reader */
- MOD63(len2); /* assumes len2 >= 0 */
- rem = (unsigned)len2;
- sum1 = adler1 & 0xffff;
- sum2 = rem * sum1;
- MOD(sum2);
- sum1 += (adler2 & 0xffff) + BASE - 1;
- sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem;
- if (sum1 >= BASE) sum1 -= BASE;
- if (sum1 >= BASE) sum1 -= BASE;
- if (sum2 >= (BASE << 1)) sum2 -= (BASE << 1);
- if (sum2 >= BASE) sum2 -= BASE;
- return sum1 | (sum2 << 16);
-}
-
-/* ========================================================================= */
-uLong ZEXPORT adler32_combine(adler1, adler2, len2)
- uLong adler1;
- uLong adler2;
- z_off_t len2;
-{
- return adler32_combine_(adler1, adler2, len2);
-}
-
-uLong ZEXPORT adler32_combine64(adler1, adler2, len2)
- uLong adler1;
- uLong adler2;
- z_off64_t len2;
-{
- return adler32_combine_(adler1, adler2, len2);
-}
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/amiga/Makefile.pup
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/amiga/Makefile.pup b/c++/libs/zlib-1.2.8/amiga/Makefile.pup
deleted file mode 100644
index 8940c12..0000000
--- a/c++/libs/zlib-1.2.8/amiga/Makefile.pup
+++ /dev/null
@@ -1,69 +0,0 @@
-# Amiga powerUP (TM) Makefile
-# makefile for libpng and SAS C V6.58/7.00 PPC compiler
-# Copyright (C) 1998 by Andreas R. Kleinert
-
-LIBNAME = libzip.a
-
-CC = scppc
-CFLAGS = NOSTKCHK NOSINT OPTIMIZE OPTGO OPTPEEP OPTINLOCAL OPTINL \
- OPTLOOP OPTRDEP=8 OPTDEP=8 OPTCOMP=8 NOVER
-AR = ppc-amigaos-ar cr
-RANLIB = ppc-amigaos-ranlib
-LD = ppc-amigaos-ld -r
-LDFLAGS = -o
-LDLIBS = LIB:scppc.a LIB:end.o
-RM = delete quiet
-
-OBJS = adler32.o compress.o crc32.o gzclose.o gzlib.o gzread.o gzwrite.o \
- uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o
-
-TEST_OBJS = example.o minigzip.o
-
-all: example minigzip
-
-check: test
-test: all
- example
- echo hello world | minigzip | minigzip -d
-
-$(LIBNAME): $(OBJS)
- $(AR) $@ $(OBJS)
- -$(RANLIB) $@
-
-example: example.o $(LIBNAME)
- $(LD) $(LDFLAGS) $@ LIB:c_ppc.o $@.o $(LIBNAME) $(LDLIBS)
-
-minigzip: minigzip.o $(LIBNAME)
- $(LD) $(LDFLAGS) $@ LIB:c_ppc.o $@.o $(LIBNAME) $(LDLIBS)
-
-mostlyclean: clean
-clean:
- $(RM) *.o example minigzip $(LIBNAME) foo.gz
-
-zip:
- zip -ul9 zlib README ChangeLog Makefile Make????.??? Makefile.?? \
- descrip.mms *.[ch]
-
-tgz:
- cd ..; tar cfz zlib/zlib.tgz zlib/README zlib/ChangeLog zlib/Makefile \
- zlib/Make????.??? zlib/Makefile.?? zlib/descrip.mms zlib/*.[ch]
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-adler32.o: zlib.h zconf.h
-compress.o: zlib.h zconf.h
-crc32.o: crc32.h zlib.h zconf.h
-deflate.o: deflate.h zutil.h zlib.h zconf.h
-example.o: zlib.h zconf.h
-gzclose.o: zlib.h zconf.h gzguts.h
-gzlib.o: zlib.h zconf.h gzguts.h
-gzread.o: zlib.h zconf.h gzguts.h
-gzwrite.o: zlib.h zconf.h gzguts.h
-inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inftrees.o: zutil.h zlib.h zconf.h inftrees.h
-minigzip.o: zlib.h zconf.h
-trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
-uncompr.o: zlib.h zconf.h
-zutil.o: zutil.h zlib.h zconf.h
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/amiga/Makefile.sas
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/amiga/Makefile.sas b/c++/libs/zlib-1.2.8/amiga/Makefile.sas
deleted file mode 100644
index 749e291..0000000
--- a/c++/libs/zlib-1.2.8/amiga/Makefile.sas
+++ /dev/null
@@ -1,68 +0,0 @@
-# SMakefile for zlib
-# Modified from the standard UNIX Makefile Copyright Jean-loup Gailly
-# Osma Ahvenlampi <Os...@hut.fi>
-# Amiga, SAS/C 6.56 & Smake
-
-CC=sc
-CFLAGS=OPT
-#CFLAGS=OPT CPU=68030
-#CFLAGS=DEBUG=LINE
-LDFLAGS=LIB z.lib
-
-SCOPTIONS=OPTSCHED OPTINLINE OPTALIAS OPTTIME OPTINLOCAL STRMERGE \
- NOICONS PARMS=BOTH NOSTACKCHECK UTILLIB NOVERSION ERRORREXX \
- DEF=POSTINC
-
-OBJS = adler32.o compress.o crc32.o gzclose.o gzlib.o gzread.o gzwrite.o \
- uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o
-
-TEST_OBJS = example.o minigzip.o
-
-all: SCOPTIONS example minigzip
-
-check: test
-test: all
- example
- echo hello world | minigzip | minigzip -d
-
-install: z.lib
- copy clone zlib.h zconf.h INCLUDE:
- copy clone z.lib LIB:
-
-z.lib: $(OBJS)
- oml z.lib r $(OBJS)
-
-example: example.o z.lib
- $(CC) $(CFLAGS) LINK TO $@ example.o $(LDFLAGS)
-
-minigzip: minigzip.o z.lib
- $(CC) $(CFLAGS) LINK TO $@ minigzip.o $(LDFLAGS)
-
-mostlyclean: clean
-clean:
- -delete force quiet example minigzip *.o z.lib foo.gz *.lnk SCOPTIONS
-
-SCOPTIONS: Makefile.sas
- copy to $@ <from <
-$(SCOPTIONS)
-<
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-adler32.o: zlib.h zconf.h
-compress.o: zlib.h zconf.h
-crc32.o: crc32.h zlib.h zconf.h
-deflate.o: deflate.h zutil.h zlib.h zconf.h
-example.o: zlib.h zconf.h
-gzclose.o: zlib.h zconf.h gzguts.h
-gzlib.o: zlib.h zconf.h gzguts.h
-gzread.o: zlib.h zconf.h gzguts.h
-gzwrite.o: zlib.h zconf.h gzguts.h
-inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inftrees.o: zutil.h zlib.h zconf.h inftrees.h
-minigzip.o: zlib.h zconf.h
-trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
-uncompr.o: zlib.h zconf.h
-zutil.o: zutil.h zlib.h zconf.h
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/as400/bndsrc
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/as400/bndsrc b/c++/libs/zlib-1.2.8/as400/bndsrc
deleted file mode 100644
index 98814fd..0000000
--- a/c++/libs/zlib-1.2.8/as400/bndsrc
+++ /dev/null
@@ -1,215 +0,0 @@
-STRPGMEXP PGMLVL(*CURRENT) SIGNATURE('ZLIB')
-
-/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
-/* Version 1.1.3 entry points. */
-/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
-
-/********************************************************************/
-/* *MODULE ADLER32 ZLIB 01/02/01 00:15:09 */
-/********************************************************************/
-
- EXPORT SYMBOL("adler32")
-
-/********************************************************************/
-/* *MODULE COMPRESS ZLIB 01/02/01 00:15:09 */
-/********************************************************************/
-
- EXPORT SYMBOL("compress")
- EXPORT SYMBOL("compress2")
-
-/********************************************************************/
-/* *MODULE CRC32 ZLIB 01/02/01 00:15:09 */
-/********************************************************************/
-
- EXPORT SYMBOL("crc32")
- EXPORT SYMBOL("get_crc_table")
-
-/********************************************************************/
-/* *MODULE DEFLATE ZLIB 01/02/01 00:15:09 */
-/********************************************************************/
-
- EXPORT SYMBOL("deflate")
- EXPORT SYMBOL("deflateEnd")
- EXPORT SYMBOL("deflateSetDictionary")
- EXPORT SYMBOL("deflateCopy")
- EXPORT SYMBOL("deflateReset")
- EXPORT SYMBOL("deflateParams")
- EXPORT SYMBOL("deflatePrime")
- EXPORT SYMBOL("deflateInit_")
- EXPORT SYMBOL("deflateInit2_")
-
-/********************************************************************/
-/* *MODULE GZIO ZLIB 01/02/01 00:15:09 */
-/********************************************************************/
-
- EXPORT SYMBOL("gzopen")
- EXPORT SYMBOL("gzdopen")
- EXPORT SYMBOL("gzsetparams")
- EXPORT SYMBOL("gzread")
- EXPORT SYMBOL("gzwrite")
- EXPORT SYMBOL("gzprintf")
- EXPORT SYMBOL("gzputs")
- EXPORT SYMBOL("gzgets")
- EXPORT SYMBOL("gzputc")
- EXPORT SYMBOL("gzgetc")
- EXPORT SYMBOL("gzflush")
- EXPORT SYMBOL("gzseek")
- EXPORT SYMBOL("gzrewind")
- EXPORT SYMBOL("gztell")
- EXPORT SYMBOL("gzeof")
- EXPORT SYMBOL("gzclose")
- EXPORT SYMBOL("gzerror")
-
-/********************************************************************/
-/* *MODULE INFLATE ZLIB 01/02/01 00:15:09 */
-/********************************************************************/
-
- EXPORT SYMBOL("inflate")
- EXPORT SYMBOL("inflateEnd")
- EXPORT SYMBOL("inflateSetDictionary")
- EXPORT SYMBOL("inflateSync")
- EXPORT SYMBOL("inflateReset")
- EXPORT SYMBOL("inflateInit_")
- EXPORT SYMBOL("inflateInit2_")
- EXPORT SYMBOL("inflateSyncPoint")
-
-/********************************************************************/
-/* *MODULE UNCOMPR ZLIB 01/02/01 00:15:09 */
-/********************************************************************/
-
- EXPORT SYMBOL("uncompress")
-
-/********************************************************************/
-/* *MODULE ZUTIL ZLIB 01/02/01 00:15:09 */
-/********************************************************************/
-
- EXPORT SYMBOL("zlibVersion")
- EXPORT SYMBOL("zError")
-
-/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
-/* Version 1.2.1 additional entry points. */
-/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
-
-/********************************************************************/
-/* *MODULE COMPRESS ZLIB 01/02/01 00:15:09 */
-/********************************************************************/
-
- EXPORT SYMBOL("compressBound")
-
-/********************************************************************/
-/* *MODULE DEFLATE ZLIB 01/02/01 00:15:09 */
-/********************************************************************/
-
- EXPORT SYMBOL("deflateBound")
-
-/********************************************************************/
-/* *MODULE GZIO ZLIB 01/02/01 00:15:09 */
-/********************************************************************/
-
- EXPORT SYMBOL("gzungetc")
- EXPORT SYMBOL("gzclearerr")
-
-/********************************************************************/
-/* *MODULE INFBACK ZLIB 01/02/01 00:15:09 */
-/********************************************************************/
-
- EXPORT SYMBOL("inflateBack")
- EXPORT SYMBOL("inflateBackEnd")
- EXPORT SYMBOL("inflateBackInit_")
-
-/********************************************************************/
-/* *MODULE INFLATE ZLIB 01/02/01 00:15:09 */
-/********************************************************************/
-
- EXPORT SYMBOL("inflateCopy")
-
-/********************************************************************/
-/* *MODULE ZUTIL ZLIB 01/02/01 00:15:09 */
-/********************************************************************/
-
- EXPORT SYMBOL("zlibCompileFlags")
-
-/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
-/* Version 1.2.5 additional entry points. */
-/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
-
-/********************************************************************/
-/* *MODULE ADLER32 ZLIB 01/02/01 00:15:09 */
-/********************************************************************/
-
- EXPORT SYMBOL("adler32_combine")
- EXPORT SYMBOL("adler32_combine64")
-
-/********************************************************************/
-/* *MODULE CRC32 ZLIB 01/02/01 00:15:09 */
-/********************************************************************/
-
- EXPORT SYMBOL("crc32_combine")
- EXPORT SYMBOL("crc32_combine64")
-
-/********************************************************************/
-/* *MODULE GZLIB ZLIB 01/02/01 00:15:09 */
-/********************************************************************/
-
- EXPORT SYMBOL("gzbuffer")
- EXPORT SYMBOL("gzoffset")
- EXPORT SYMBOL("gzoffset64")
- EXPORT SYMBOL("gzopen64")
- EXPORT SYMBOL("gzseek64")
- EXPORT SYMBOL("gztell64")
-
-/********************************************************************/
-/* *MODULE GZREAD ZLIB 01/02/01 00:15:09 */
-/********************************************************************/
-
- EXPORT SYMBOL("gzclose_r")
-
-/********************************************************************/
-/* *MODULE GZWRITE ZLIB 01/02/01 00:15:09 */
-/********************************************************************/
-
- EXPORT SYMBOL("gzclose_w")
-
-/********************************************************************/
-/* *MODULE INFLATE ZLIB 01/02/01 00:15:09 */
-/********************************************************************/
-
- EXPORT SYMBOL("inflateMark")
- EXPORT SYMBOL("inflatePrime")
- EXPORT SYMBOL("inflateReset2")
- EXPORT SYMBOL("inflateUndermine")
-
-/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
-/* Version 1.2.6 additional entry points. */
-/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
-
-/********************************************************************/
-/* *MODULE DEFLATE ZLIB 01/02/01 00:15:09 */
-/********************************************************************/
-
- EXPORT SYMBOL("deflateResetKeep")
- EXPORT SYMBOL("deflatePending")
-
-/********************************************************************/
-/* *MODULE GZWRITE ZLIB 01/02/01 00:15:09 */
-/********************************************************************/
-
- EXPORT SYMBOL("gzgetc_")
-
-/********************************************************************/
-/* *MODULE INFLATE ZLIB 01/02/01 00:15:09 */
-/********************************************************************/
-
- EXPORT SYMBOL("inflateResetKeep")
-
-/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
-/* Version 1.2.8 additional entry points. */
-/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
-
-/********************************************************************/
-/* *MODULE INFLATE ZLIB 01/02/01 00:15:09 */
-/********************************************************************/
-
- EXPORT SYMBOL("inflateGetDictionary")
-
-ENDPGMEXP
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/as400/compile.clp
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/as400/compile.clp b/c++/libs/zlib-1.2.8/as400/compile.clp
deleted file mode 100644
index e3f47c6..0000000
--- a/c++/libs/zlib-1.2.8/as400/compile.clp
+++ /dev/null
@@ -1,110 +0,0 @@
-/******************************************************************************/
-/* */
-/* ZLIB */
-/* */
-/* Compile sources into modules and link them into a service program. */
-/* */
-/******************************************************************************/
-
- PGM
-
-/* Configuration adjustable parameters. */
-
- DCL VAR(&SRCLIB) TYPE(*CHAR) LEN(10) +
- VALUE('ZLIB') /* Source library. */
- DCL VAR(&SRCFILE) TYPE(*CHAR) LEN(10) +
- VALUE('SOURCES') /* Source member file. */
- DCL VAR(&CTLFILE) TYPE(*CHAR) LEN(10) +
- VALUE('TOOLS') /* Control member file. */
-
- DCL VAR(&MODLIB) TYPE(*CHAR) LEN(10) +
- VALUE('ZLIB') /* Module library. */
-
- DCL VAR(&SRVLIB) TYPE(*CHAR) LEN(10) +
- VALUE('LGPL') /* Service program library. */
-
- DCL VAR(&CFLAGS) TYPE(*CHAR) +
- VALUE('OPTIMIZE(40)') /* Compile options. */
-
- DCL VAR(&TGTRLS) TYPE(*CHAR) +
- VALUE('V5R3M0') /* Target release. */
-
-
-/* Working storage. */
-
- DCL VAR(&CMDLEN) TYPE(*DEC) LEN(15 5) VALUE(300) /* Command length. */
- DCL VAR(&CMD) TYPE(*CHAR) LEN(512)
- DCL VAR(&FIXDCMD) TYPE(*CHAR) LEN(512)
-
-
-/* Compile sources into modules. */
-
- CHGVAR VAR(&FIXDCMD) VALUE('CRTCMOD' *BCAT &CFLAGS *BCAT +
- 'SYSIFCOPT(*IFS64IO)' *BCAT +
- 'DEFINE(''_LARGEFILE64_SOURCE''' *BCAT +
- '''_LFS64_LARGEFILE=1'') TGTRLS(' *TCAT &TGTRLS *TCAT +
- ') SRCFILE(' *TCAT &SRCLIB *TCAT '/' *TCAT +
- &SRCFILE *TCAT ') MODULE(' *TCAT &MODLIB *TCAT '/')
-
-
- CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'ADLER32)')
- CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
- CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'COMPRESS)')
- CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
- CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'CRC32)')
- CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
- CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'DEFLATE)')
- CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
- CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'GZCLOSE)')
- CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
- CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'GZLIB)')
- CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
- CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'GZREAD)')
- CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
- CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'GZWRITE)')
- CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
- CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'INFBACK)')
- CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
- CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'INFFAST)')
- CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
- CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'INFLATE)')
- CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
- CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'INFTREES)')
- CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
- CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'TREES)')
- CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
- CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'UNCOMPR)')
- CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
- CHGVAR VAR(&CMD) VALUE(&FIXDCMD *TCAT 'ZUTIL)')
- CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
-
-
-/* Link modules into a service program. */
-
- CRTSRVPGM SRVPGM(&SRVLIB/ZLIB) +
- MODULE(&MODLIB/ADLER32 &MODLIB/COMPRESS +
- &MODLIB/CRC32 &MODLIB/DEFLATE +
- &MODLIB/GZCLOSE &MODLIB/GZLIB +
- &MODLIB/GZREAD &MODLIB/GZWRITE +
- &MODLIB/INFBACK &MODLIB/INFFAST +
- &MODLIB/INFLATE &MODLIB/INFTREES +
- &MODLIB/TREES &MODLIB/UNCOMPR +
- &MODLIB/ZUTIL) +
- SRCFILE(&SRCLIB/&CTLFILE) SRCMBR(BNDSRC) +
- TEXT('ZLIB 1.2.8') TGTRLS(&TGTRLS)
-
- ENDPGM
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/as400/readme.txt
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/as400/readme.txt b/c++/libs/zlib-1.2.8/as400/readme.txt
deleted file mode 100644
index 7b5d93b..0000000
--- a/c++/libs/zlib-1.2.8/as400/readme.txt
+++ /dev/null
@@ -1,115 +0,0 @@
- ZLIB version 1.2.8 for AS400 installation instructions
-
-I) From an AS400 *SAVF file:
-
-1) Unpacking archive to an AS400 save file
-
-On the AS400:
-
-_ Create the ZLIB AS400 library:
-
- CRTLIB LIB(ZLIB) TYPE(*PROD) TEXT('ZLIB compression API library')
-
-_ Create a work save file, for example:
-
- CRTSAVF FILE(ZLIB/ZLIBSAVF)
-
-On a PC connected to the target AS400:
-
-_ Unpack the save file image to a PC file "ZLIBSAVF"
-_ Upload this file into the save file on the AS400, for example
- using ftp in BINARY mode.
-
-
-2) Populating the ZLIB AS400 source library
-
-On the AS400:
-
-_ Extract the saved objects into the ZLIB AS400 library using:
-
-RSTOBJ OBJ(*ALL) SAVLIB(ZLIB) DEV(*SAVF) SAVF(ZLIB/ZLIBSAVF) RSTLIB(ZLIB)
-
-
-3) Customize installation:
-
-_ Edit CL member ZLIB/TOOLS(COMPILE) and change parameters if needed,
- according to the comments.
-
-_ Compile this member with:
-
- CRTCLPGM PGM(ZLIB/COMPILE) SRCFILE(ZLIB/TOOLS) SRCMBR(COMPILE)
-
-
-4) Compile and generate the service program:
-
-_ This can now be done by executing:
-
- CALL PGM(ZLIB/COMPILE)
-
-
-
-II) From the original source distribution:
-
-1) On the AS400, create the source library:
-
- CRTLIB LIB(ZLIB) TYPE(*PROD) TEXT('ZLIB compression API library')
-
-2) Create the source files:
-
- CRTSRCPF FILE(ZLIB/SOURCES) RCDLEN(112) TEXT('ZLIB library modules')
- CRTSRCPF FILE(ZLIB/H) RCDLEN(112) TEXT('ZLIB library includes')
- CRTSRCPF FILE(ZLIB/TOOLS) RCDLEN(112) TEXT('ZLIB library control utilities')
-
-3) From the machine hosting the distribution files, upload them (with
- FTP in text mode, for example) according to the following table:
-
- Original AS400 AS400 AS400 AS400
- file file member type description
- SOURCES Original ZLIB C subprogram sources
- adler32.c ADLER32 C ZLIB - Compute the Adler-32 checksum of a dta strm
- compress.c COMPRESS C ZLIB - Compress a memory buffer
- crc32.c CRC32 C ZLIB - Compute the CRC-32 of a data stream
- deflate.c DEFLATE C ZLIB - Compress data using the deflation algorithm
- gzclose.c GZCLOSE C ZLIB - Close .gz files
- gzlib.c GZLIB C ZLIB - Miscellaneous .gz files IO support
- gzread.c GZREAD C ZLIB - Read .gz files
- gzwrite.c GZWRITE C ZLIB - Write .gz files
- infback.c INFBACK C ZLIB - Inflate using a callback interface
- inffast.c INFFAST C ZLIB - Fast proc. literals & length/distance pairs
- inflate.c INFLATE C ZLIB - Interface to inflate modules
- inftrees.c INFTREES C ZLIB - Generate Huffman trees for efficient decode
- trees.c TREES C ZLIB - Output deflated data using Huffman coding
- uncompr.c UNCOMPR C ZLIB - Decompress a memory buffer
- zutil.c ZUTIL C ZLIB - Target dependent utility functions
- H Original ZLIB C and ILE/RPG include files
- crc32.h CRC32 C ZLIB - CRC32 tables
- deflate.h DEFLATE C ZLIB - Internal compression state
- gzguts.h GZGUTS C ZLIB - Definitions for the gzclose module
- inffast.h INFFAST C ZLIB - Header to use inffast.c
- inffixed.h INFFIXED C ZLIB - Table for decoding fixed codes
- inflate.h INFLATE C ZLIB - Internal inflate state definitions
- inftrees.h INFTREES C ZLIB - Header to use inftrees.c
- trees.h TREES C ZLIB - Created automatically with -DGEN_TREES_H
- zconf.h ZCONF C ZLIB - Compression library configuration
- zlib.h ZLIB C ZLIB - Compression library C user interface
- as400/zlib.inc ZLIB.INC RPGLE ZLIB - Compression library ILE RPG user interface
- zutil.h ZUTIL C ZLIB - Internal interface and configuration
- TOOLS Building source software & AS/400 README
- as400/bndsrc BNDSRC Entry point exportation list
- as400/compile.clp COMPILE CLP Compile sources & generate service program
- as400/readme.txt README TXT Installation instructions
-
-4) Continue as in I)3).
-
-
-
-
-Notes: For AS400 ILE RPG programmers, a /copy member defining the ZLIB
- API prototypes for ILE RPG can be found in ZLIB/H(ZLIB.INC).
- Please read comments in this member for more information.
-
- Remember that most foreign textual data are ASCII coded: this
- implementation does not handle conversion from/to ASCII, so
- text data code conversions must be done explicitely.
-
- Mainly for the reason above, always open zipped files in binary mode.
[36/51] [partial] orc git commit: ORC-204 Update and use CMake
External Project to build C++ compression libraries.
Posted by om...@apache.org.
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/snappy-1.1.2/snappy_unittest.cc
----------------------------------------------------------------------
diff --git a/c++/libs/snappy-1.1.2/snappy_unittest.cc b/c++/libs/snappy-1.1.2/snappy_unittest.cc
deleted file mode 100644
index be7bba6..0000000
--- a/c++/libs/snappy-1.1.2/snappy_unittest.cc
+++ /dev/null
@@ -1,1355 +0,0 @@
-// Copyright 2005 and onwards Google Inc.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#include <math.h>
-#include <stdlib.h>
-
-
-#include <algorithm>
-#include <string>
-#include <vector>
-
-#include "snappy.h"
-#include "snappy-internal.h"
-#include "snappy-test.h"
-#include "snappy-sinksource.h"
-
-DEFINE_int32(start_len, -1,
- "Starting prefix size for testing (-1: just full file contents)");
-DEFINE_int32(end_len, -1,
- "Starting prefix size for testing (-1: just full file contents)");
-DEFINE_int32(bytes, 10485760,
- "How many bytes to compress/uncompress per file for timing");
-
-DEFINE_bool(zlib, false,
- "Run zlib compression (http://www.zlib.net)");
-DEFINE_bool(lzo, false,
- "Run LZO compression (http://www.oberhumer.com/opensource/lzo/)");
-DEFINE_bool(quicklz, false,
- "Run quickLZ compression (http://www.quicklz.com/)");
-DEFINE_bool(liblzf, false,
- "Run libLZF compression "
- "(http://www.goof.com/pcg/marc/liblzf.html)");
-DEFINE_bool(fastlz, false,
- "Run FastLZ compression (http://www.fastlz.org/");
-DEFINE_bool(snappy, true, "Run snappy compression");
-
-
-DEFINE_bool(write_compressed, false,
- "Write compressed versions of each file to <file>.comp");
-DEFINE_bool(write_uncompressed, false,
- "Write uncompressed versions of each file to <file>.uncomp");
-
-namespace snappy {
-
-
-#ifdef HAVE_FUNC_MMAP
-
-// To test against code that reads beyond its input, this class copies a
-// string to a newly allocated group of pages, the last of which
-// is made unreadable via mprotect. Note that we need to allocate the
-// memory with mmap(), as POSIX allows mprotect() only on memory allocated
-// with mmap(), and some malloc/posix_memalign implementations expect to
-// be able to read previously allocated memory while doing heap allocations.
-class DataEndingAtUnreadablePage {
- public:
- explicit DataEndingAtUnreadablePage(const string& s) {
- const size_t page_size = getpagesize();
- const size_t size = s.size();
- // Round up space for string to a multiple of page_size.
- size_t space_for_string = (size + page_size - 1) & ~(page_size - 1);
- alloc_size_ = space_for_string + page_size;
- mem_ = mmap(NULL, alloc_size_,
- PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
- CHECK_NE(MAP_FAILED, mem_);
- protected_page_ = reinterpret_cast<char*>(mem_) + space_for_string;
- char* dst = protected_page_ - size;
- memcpy(dst, s.data(), size);
- data_ = dst;
- size_ = size;
- // Make guard page unreadable.
- CHECK_EQ(0, mprotect(protected_page_, page_size, PROT_NONE));
- }
-
- ~DataEndingAtUnreadablePage() {
- // Undo the mprotect.
- CHECK_EQ(0, mprotect(protected_page_, getpagesize(), PROT_READ|PROT_WRITE));
- CHECK_EQ(0, munmap(mem_, alloc_size_));
- }
-
- const char* data() const { return data_; }
- size_t size() const { return size_; }
-
- private:
- size_t alloc_size_;
- void* mem_;
- char* protected_page_;
- const char* data_;
- size_t size_;
-};
-
-#else // HAVE_FUNC_MMAP
-
-// Fallback for systems without mmap.
-typedef string DataEndingAtUnreadablePage;
-
-#endif
-
-enum CompressorType {
- ZLIB, LZO, LIBLZF, QUICKLZ, FASTLZ, SNAPPY
-};
-
-const char* names[] = {
- "ZLIB", "LZO", "LIBLZF", "QUICKLZ", "FASTLZ", "SNAPPY"
-};
-
-static size_t MinimumRequiredOutputSpace(size_t input_size,
- CompressorType comp) {
- switch (comp) {
-#ifdef ZLIB_VERSION
- case ZLIB:
- return ZLib::MinCompressbufSize(input_size);
-#endif // ZLIB_VERSION
-
-#ifdef LZO_VERSION
- case LZO:
- return input_size + input_size/64 + 16 + 3;
-#endif // LZO_VERSION
-
-#ifdef LZF_VERSION
- case LIBLZF:
- return input_size;
-#endif // LZF_VERSION
-
-#ifdef QLZ_VERSION_MAJOR
- case QUICKLZ:
- return input_size + 36000; // 36000 is used for scratch.
-#endif // QLZ_VERSION_MAJOR
-
-#ifdef FASTLZ_VERSION
- case FASTLZ:
- return max(static_cast<int>(ceil(input_size * 1.05)), 66);
-#endif // FASTLZ_VERSION
-
- case SNAPPY:
- return snappy::MaxCompressedLength(input_size);
-
- default:
- LOG(FATAL) << "Unknown compression type number " << comp;
- }
-}
-
-// Returns true if we successfully compressed, false otherwise.
-//
-// If compressed_is_preallocated is set, do not resize the compressed buffer.
-// This is typically what you want for a benchmark, in order to not spend
-// time in the memory allocator. If you do set this flag, however,
-// "compressed" must be preinitialized to at least MinCompressbufSize(comp)
-// number of bytes, and may contain junk bytes at the end after return.
-static bool Compress(const char* input, size_t input_size, CompressorType comp,
- string* compressed, bool compressed_is_preallocated) {
- if (!compressed_is_preallocated) {
- compressed->resize(MinimumRequiredOutputSpace(input_size, comp));
- }
-
- switch (comp) {
-#ifdef ZLIB_VERSION
- case ZLIB: {
- ZLib zlib;
- uLongf destlen = compressed->size();
- int ret = zlib.Compress(
- reinterpret_cast<Bytef*>(string_as_array(compressed)),
- &destlen,
- reinterpret_cast<const Bytef*>(input),
- input_size);
- CHECK_EQ(Z_OK, ret);
- if (!compressed_is_preallocated) {
- compressed->resize(destlen);
- }
- return true;
- }
-#endif // ZLIB_VERSION
-
-#ifdef LZO_VERSION
- case LZO: {
- unsigned char* mem = new unsigned char[LZO1X_1_15_MEM_COMPRESS];
- lzo_uint destlen;
- int ret = lzo1x_1_15_compress(
- reinterpret_cast<const uint8*>(input),
- input_size,
- reinterpret_cast<uint8*>(string_as_array(compressed)),
- &destlen,
- mem);
- CHECK_EQ(LZO_E_OK, ret);
- delete[] mem;
- if (!compressed_is_preallocated) {
- compressed->resize(destlen);
- }
- break;
- }
-#endif // LZO_VERSION
-
-#ifdef LZF_VERSION
- case LIBLZF: {
- int destlen = lzf_compress(input,
- input_size,
- string_as_array(compressed),
- input_size);
- if (destlen == 0) {
- // lzf *can* cause lots of blowup when compressing, so they
- // recommend to limit outsize to insize, and just not compress
- // if it's bigger. Ideally, we'd just swap input and output.
- compressed->assign(input, input_size);
- destlen = input_size;
- }
- if (!compressed_is_preallocated) {
- compressed->resize(destlen);
- }
- break;
- }
-#endif // LZF_VERSION
-
-#ifdef QLZ_VERSION_MAJOR
- case QUICKLZ: {
- qlz_state_compress *state_compress = new qlz_state_compress;
- int destlen = qlz_compress(input,
- string_as_array(compressed),
- input_size,
- state_compress);
- delete state_compress;
- CHECK_NE(0, destlen);
- if (!compressed_is_preallocated) {
- compressed->resize(destlen);
- }
- break;
- }
-#endif // QLZ_VERSION_MAJOR
-
-#ifdef FASTLZ_VERSION
- case FASTLZ: {
- // Use level 1 compression since we mostly care about speed.
- int destlen = fastlz_compress_level(
- 1,
- input,
- input_size,
- string_as_array(compressed));
- if (!compressed_is_preallocated) {
- compressed->resize(destlen);
- }
- CHECK_NE(destlen, 0);
- break;
- }
-#endif // FASTLZ_VERSION
-
- case SNAPPY: {
- size_t destlen;
- snappy::RawCompress(input, input_size,
- string_as_array(compressed),
- &destlen);
- CHECK_LE(destlen, snappy::MaxCompressedLength(input_size));
- if (!compressed_is_preallocated) {
- compressed->resize(destlen);
- }
- break;
- }
-
-
- default: {
- return false; // the asked-for library wasn't compiled in
- }
- }
- return true;
-}
-
-static bool Uncompress(const string& compressed, CompressorType comp,
- int size, string* output) {
- switch (comp) {
-#ifdef ZLIB_VERSION
- case ZLIB: {
- output->resize(size);
- ZLib zlib;
- uLongf destlen = output->size();
- int ret = zlib.Uncompress(
- reinterpret_cast<Bytef*>(string_as_array(output)),
- &destlen,
- reinterpret_cast<const Bytef*>(compressed.data()),
- compressed.size());
- CHECK_EQ(Z_OK, ret);
- CHECK_EQ(static_cast<uLongf>(size), destlen);
- break;
- }
-#endif // ZLIB_VERSION
-
-#ifdef LZO_VERSION
- case LZO: {
- output->resize(size);
- lzo_uint destlen;
- int ret = lzo1x_decompress(
- reinterpret_cast<const uint8*>(compressed.data()),
- compressed.size(),
- reinterpret_cast<uint8*>(string_as_array(output)),
- &destlen,
- NULL);
- CHECK_EQ(LZO_E_OK, ret);
- CHECK_EQ(static_cast<lzo_uint>(size), destlen);
- break;
- }
-#endif // LZO_VERSION
-
-#ifdef LZF_VERSION
- case LIBLZF: {
- output->resize(size);
- int destlen = lzf_decompress(compressed.data(),
- compressed.size(),
- string_as_array(output),
- output->size());
- if (destlen == 0) {
- // This error probably means we had decided not to compress,
- // and thus have stored input in output directly.
- output->assign(compressed.data(), compressed.size());
- destlen = compressed.size();
- }
- CHECK_EQ(destlen, size);
- break;
- }
-#endif // LZF_VERSION
-
-#ifdef QLZ_VERSION_MAJOR
- case QUICKLZ: {
- output->resize(size);
- qlz_state_decompress *state_decompress = new qlz_state_decompress;
- int destlen = qlz_decompress(compressed.data(),
- string_as_array(output),
- state_decompress);
- delete state_decompress;
- CHECK_EQ(destlen, size);
- break;
- }
-#endif // QLZ_VERSION_MAJOR
-
-#ifdef FASTLZ_VERSION
- case FASTLZ: {
- output->resize(size);
- int destlen = fastlz_decompress(compressed.data(),
- compressed.length(),
- string_as_array(output),
- size);
- CHECK_EQ(destlen, size);
- break;
- }
-#endif // FASTLZ_VERSION
-
- case SNAPPY: {
- snappy::RawUncompress(compressed.data(), compressed.size(),
- string_as_array(output));
- break;
- }
-
-
- default: {
- return false; // the asked-for library wasn't compiled in
- }
- }
- return true;
-}
-
-static void Measure(const char* data,
- size_t length,
- CompressorType comp,
- int repeats,
- int block_size) {
- // Run tests a few time and pick median running times
- static const int kRuns = 5;
- double ctime[kRuns];
- double utime[kRuns];
- int compressed_size = 0;
-
- {
- // Chop the input into blocks
- int num_blocks = (length + block_size - 1) / block_size;
- vector<const char*> input(num_blocks);
- vector<size_t> input_length(num_blocks);
- vector<string> compressed(num_blocks);
- vector<string> output(num_blocks);
- for (int b = 0; b < num_blocks; b++) {
- int input_start = b * block_size;
- int input_limit = min<int>((b+1)*block_size, length);
- input[b] = data+input_start;
- input_length[b] = input_limit-input_start;
-
- // Pre-grow the output buffer so we don't measure string append time.
- compressed[b].resize(MinimumRequiredOutputSpace(block_size, comp));
- }
-
- // First, try one trial compression to make sure the code is compiled in
- if (!Compress(input[0], input_length[0], comp, &compressed[0], true)) {
- LOG(WARNING) << "Skipping " << names[comp] << ": "
- << "library not compiled in";
- return;
- }
-
- for (int run = 0; run < kRuns; run++) {
- CycleTimer ctimer, utimer;
-
- for (int b = 0; b < num_blocks; b++) {
- // Pre-grow the output buffer so we don't measure string append time.
- compressed[b].resize(MinimumRequiredOutputSpace(block_size, comp));
- }
-
- ctimer.Start();
- for (int b = 0; b < num_blocks; b++)
- for (int i = 0; i < repeats; i++)
- Compress(input[b], input_length[b], comp, &compressed[b], true);
- ctimer.Stop();
-
- // Compress once more, with resizing, so we don't leave junk
- // at the end that will confuse the decompressor.
- for (int b = 0; b < num_blocks; b++) {
- Compress(input[b], input_length[b], comp, &compressed[b], false);
- }
-
- for (int b = 0; b < num_blocks; b++) {
- output[b].resize(input_length[b]);
- }
-
- utimer.Start();
- for (int i = 0; i < repeats; i++)
- for (int b = 0; b < num_blocks; b++)
- Uncompress(compressed[b], comp, input_length[b], &output[b]);
- utimer.Stop();
-
- ctime[run] = ctimer.Get();
- utime[run] = utimer.Get();
- }
-
- compressed_size = 0;
- for (int i = 0; i < compressed.size(); i++) {
- compressed_size += compressed[i].size();
- }
- }
-
- sort(ctime, ctime + kRuns);
- sort(utime, utime + kRuns);
- const int med = kRuns/2;
-
- float comp_rate = (length / ctime[med]) * repeats / 1048576.0;
- float uncomp_rate = (length / utime[med]) * repeats / 1048576.0;
- string x = names[comp];
- x += ":";
- string urate = (uncomp_rate >= 0)
- ? StringPrintf("%.1f", uncomp_rate)
- : string("?");
- printf("%-7s [b %dM] bytes %6d -> %6d %4.1f%% "
- "comp %5.1f MB/s uncomp %5s MB/s\n",
- x.c_str(),
- block_size/(1<<20),
- static_cast<int>(length), static_cast<uint32>(compressed_size),
- (compressed_size * 100.0) / max<int>(1, length),
- comp_rate,
- urate.c_str());
-}
-
-
-static int VerifyString(const string& input) {
- string compressed;
- DataEndingAtUnreadablePage i(input);
- const size_t written = snappy::Compress(i.data(), i.size(), &compressed);
- CHECK_EQ(written, compressed.size());
- CHECK_LE(compressed.size(),
- snappy::MaxCompressedLength(input.size()));
- CHECK(snappy::IsValidCompressedBuffer(compressed.data(), compressed.size()));
-
- string uncompressed;
- DataEndingAtUnreadablePage c(compressed);
- CHECK(snappy::Uncompress(c.data(), c.size(), &uncompressed));
- CHECK_EQ(uncompressed, input);
- return uncompressed.size();
-}
-
-
-static void VerifyIOVec(const string& input) {
- string compressed;
- DataEndingAtUnreadablePage i(input);
- const size_t written = snappy::Compress(i.data(), i.size(), &compressed);
- CHECK_EQ(written, compressed.size());
- CHECK_LE(compressed.size(),
- snappy::MaxCompressedLength(input.size()));
- CHECK(snappy::IsValidCompressedBuffer(compressed.data(), compressed.size()));
-
- // Try uncompressing into an iovec containing a random number of entries
- // ranging from 1 to 10.
- char* buf = new char[input.size()];
- ACMRandom rnd(input.size());
- int num = rnd.Next() % 10 + 1;
- if (input.size() < num) {
- num = input.size();
- }
- struct iovec* iov = new iovec[num];
- int used_so_far = 0;
- for (int i = 0; i < num; ++i) {
- iov[i].iov_base = buf + used_so_far;
- if (i == num - 1) {
- iov[i].iov_len = input.size() - used_so_far;
- } else {
- // Randomly choose to insert a 0 byte entry.
- if (rnd.OneIn(5)) {
- iov[i].iov_len = 0;
- } else {
- iov[i].iov_len = rnd.Uniform(input.size());
- }
- }
- used_so_far += iov[i].iov_len;
- }
- CHECK(snappy::RawUncompressToIOVec(
- compressed.data(), compressed.size(), iov, num));
- CHECK(!memcmp(buf, input.data(), input.size()));
- delete[] iov;
- delete[] buf;
-}
-
-// Test that data compressed by a compressor that does not
-// obey block sizes is uncompressed properly.
-static void VerifyNonBlockedCompression(const string& input) {
- if (input.length() > snappy::kBlockSize) {
- // We cannot test larger blocks than the maximum block size, obviously.
- return;
- }
-
- string prefix;
- Varint::Append32(&prefix, input.size());
-
- // Setup compression table
- snappy::internal::WorkingMemory wmem;
- int table_size;
- uint16* table = wmem.GetHashTable(input.size(), &table_size);
-
- // Compress entire input in one shot
- string compressed;
- compressed += prefix;
- compressed.resize(prefix.size()+snappy::MaxCompressedLength(input.size()));
- char* dest = string_as_array(&compressed) + prefix.size();
- char* end = snappy::internal::CompressFragment(input.data(), input.size(),
- dest, table, table_size);
- compressed.resize(end - compressed.data());
-
- // Uncompress into string
- string uncomp_str;
- CHECK(snappy::Uncompress(compressed.data(), compressed.size(), &uncomp_str));
- CHECK_EQ(uncomp_str, input);
-
-}
-
-// Expand the input so that it is at least K times as big as block size
-static string Expand(const string& input) {
- static const int K = 3;
- string data = input;
- while (data.size() < K * snappy::kBlockSize) {
- data += input;
- }
- return data;
-}
-
-static int Verify(const string& input) {
- VLOG(1) << "Verifying input of size " << input.size();
-
- // Compress using string based routines
- const int result = VerifyString(input);
-
-
- VerifyNonBlockedCompression(input);
- VerifyIOVec(input);
- if (!input.empty()) {
- const string expanded = Expand(input);
- VerifyNonBlockedCompression(expanded);
- VerifyIOVec(input);
- }
-
-
- return result;
-}
-
-// This test checks to ensure that snappy doesn't coredump if it gets
-// corrupted data.
-
-static bool IsValidCompressedBuffer(const string& c) {
- return snappy::IsValidCompressedBuffer(c.data(), c.size());
-}
-static bool Uncompress(const string& c, string* u) {
- return snappy::Uncompress(c.data(), c.size(), u);
-}
-
-TYPED_TEST(CorruptedTest, VerifyCorrupted) {
- string source = "making sure we don't crash with corrupted input";
- VLOG(1) << source;
- string dest;
- TypeParam uncmp;
- snappy::Compress(source.data(), source.size(), &dest);
-
- // Mess around with the data. It's hard to simulate all possible
- // corruptions; this is just one example ...
- CHECK_GT(dest.size(), 3);
- dest[1]--;
- dest[3]++;
- // this really ought to fail.
- CHECK(!IsValidCompressedBuffer(TypeParam(dest)));
- CHECK(!Uncompress(TypeParam(dest), &uncmp));
-
- // This is testing for a security bug - a buffer that decompresses to 100k
- // but we lie in the snappy header and only reserve 0 bytes of memory :)
- source.resize(100000);
- for (int i = 0; i < source.length(); ++i) {
- source[i] = 'A';
- }
- snappy::Compress(source.data(), source.size(), &dest);
- dest[0] = dest[1] = dest[2] = dest[3] = 0;
- CHECK(!IsValidCompressedBuffer(TypeParam(dest)));
- CHECK(!Uncompress(TypeParam(dest), &uncmp));
-
- if (sizeof(void *) == 4) {
- // Another security check; check a crazy big length can't DoS us with an
- // over-allocation.
- // Currently this is done only for 32-bit builds. On 64-bit builds,
- // where 3 GB might be an acceptable allocation size, Uncompress()
- // attempts to decompress, and sometimes causes the test to run out of
- // memory.
- dest[0] = dest[1] = dest[2] = dest[3] = 0xff;
- // This decodes to a really large size, i.e., about 3 GB.
- dest[4] = 'k';
- CHECK(!IsValidCompressedBuffer(TypeParam(dest)));
- CHECK(!Uncompress(TypeParam(dest), &uncmp));
- } else {
- LOG(WARNING) << "Crazy decompression lengths not checked on 64-bit build";
- }
-
- // This decodes to about 2 MB; much smaller, but should still fail.
- dest[0] = dest[1] = dest[2] = 0xff;
- dest[3] = 0x00;
- CHECK(!IsValidCompressedBuffer(TypeParam(dest)));
- CHECK(!Uncompress(TypeParam(dest), &uncmp));
-
- // try reading stuff in from a bad file.
- for (int i = 1; i <= 3; ++i) {
- string data = ReadTestDataFile(StringPrintf("baddata%d.snappy", i).c_str(),
- 0);
- string uncmp;
- // check that we don't return a crazy length
- size_t ulen;
- CHECK(!snappy::GetUncompressedLength(data.data(), data.size(), &ulen)
- || (ulen < (1<<20)));
- uint32 ulen2;
- snappy::ByteArraySource source(data.data(), data.size());
- CHECK(!snappy::GetUncompressedLength(&source, &ulen2) ||
- (ulen2 < (1<<20)));
- CHECK(!IsValidCompressedBuffer(TypeParam(data)));
- CHECK(!Uncompress(TypeParam(data), &uncmp));
- }
-}
-
-// Helper routines to construct arbitrary compressed strings.
-// These mirror the compression code in snappy.cc, but are copied
-// here so that we can bypass some limitations in the how snappy.cc
-// invokes these routines.
-static void AppendLiteral(string* dst, const string& literal) {
- if (literal.empty()) return;
- int n = literal.size() - 1;
- if (n < 60) {
- // Fit length in tag byte
- dst->push_back(0 | (n << 2));
- } else {
- // Encode in upcoming bytes
- char number[4];
- int count = 0;
- while (n > 0) {
- number[count++] = n & 0xff;
- n >>= 8;
- }
- dst->push_back(0 | ((59+count) << 2));
- *dst += string(number, count);
- }
- *dst += literal;
-}
-
-static void AppendCopy(string* dst, int offset, int length) {
- while (length > 0) {
- // Figure out how much to copy in one shot
- int to_copy;
- if (length >= 68) {
- to_copy = 64;
- } else if (length > 64) {
- to_copy = 60;
- } else {
- to_copy = length;
- }
- length -= to_copy;
-
- if ((to_copy >= 4) && (to_copy < 12) && (offset < 2048)) {
- assert(to_copy-4 < 8); // Must fit in 3 bits
- dst->push_back(1 | ((to_copy-4) << 2) | ((offset >> 8) << 5));
- dst->push_back(offset & 0xff);
- } else if (offset < 65536) {
- dst->push_back(2 | ((to_copy-1) << 2));
- dst->push_back(offset & 0xff);
- dst->push_back(offset >> 8);
- } else {
- dst->push_back(3 | ((to_copy-1) << 2));
- dst->push_back(offset & 0xff);
- dst->push_back((offset >> 8) & 0xff);
- dst->push_back((offset >> 16) & 0xff);
- dst->push_back((offset >> 24) & 0xff);
- }
- }
-}
-
-TEST(Snappy, SimpleTests) {
- Verify("");
- Verify("a");
- Verify("ab");
- Verify("abc");
-
- Verify("aaaaaaa" + string(16, 'b') + string("aaaaa") + "abc");
- Verify("aaaaaaa" + string(256, 'b') + string("aaaaa") + "abc");
- Verify("aaaaaaa" + string(2047, 'b') + string("aaaaa") + "abc");
- Verify("aaaaaaa" + string(65536, 'b') + string("aaaaa") + "abc");
- Verify("abcaaaaaaa" + string(65536, 'b') + string("aaaaa") + "abc");
-}
-
-// Verify max blowup (lots of four-byte copies)
-TEST(Snappy, MaxBlowup) {
- string input;
- for (int i = 0; i < 20000; i++) {
- ACMRandom rnd(i);
- uint32 bytes = static_cast<uint32>(rnd.Next());
- input.append(reinterpret_cast<char*>(&bytes), sizeof(bytes));
- }
- for (int i = 19999; i >= 0; i--) {
- ACMRandom rnd(i);
- uint32 bytes = static_cast<uint32>(rnd.Next());
- input.append(reinterpret_cast<char*>(&bytes), sizeof(bytes));
- }
- Verify(input);
-}
-
-TEST(Snappy, RandomData) {
- ACMRandom rnd(FLAGS_test_random_seed);
-
- const int num_ops = 20000;
- for (int i = 0; i < num_ops; i++) {
- if ((i % 1000) == 0) {
- VLOG(0) << "Random op " << i << " of " << num_ops;
- }
-
- string x;
- int len = rnd.Uniform(4096);
- if (i < 100) {
- len = 65536 + rnd.Uniform(65536);
- }
- while (x.size() < len) {
- int run_len = 1;
- if (rnd.OneIn(10)) {
- run_len = rnd.Skewed(8);
- }
- char c = (i < 100) ? rnd.Uniform(256) : rnd.Skewed(3);
- while (run_len-- > 0 && x.size() < len) {
- x += c;
- }
- }
-
- Verify(x);
- }
-}
-
-TEST(Snappy, FourByteOffset) {
- // The new compressor cannot generate four-byte offsets since
- // it chops up the input into 32KB pieces. So we hand-emit the
- // copy manually.
-
- // The two fragments that make up the input string.
- string fragment1 = "012345689abcdefghijklmnopqrstuvwxyz";
- string fragment2 = "some other string";
-
- // How many times each fragment is emitted.
- const int n1 = 2;
- const int n2 = 100000 / fragment2.size();
- const int length = n1 * fragment1.size() + n2 * fragment2.size();
-
- string compressed;
- Varint::Append32(&compressed, length);
-
- AppendLiteral(&compressed, fragment1);
- string src = fragment1;
- for (int i = 0; i < n2; i++) {
- AppendLiteral(&compressed, fragment2);
- src += fragment2;
- }
- AppendCopy(&compressed, src.size(), fragment1.size());
- src += fragment1;
- CHECK_EQ(length, src.size());
-
- string uncompressed;
- CHECK(snappy::IsValidCompressedBuffer(compressed.data(), compressed.size()));
- CHECK(snappy::Uncompress(compressed.data(), compressed.size(),
- &uncompressed));
- CHECK_EQ(uncompressed, src);
-}
-
-TEST(Snappy, IOVecEdgeCases) {
- // Test some tricky edge cases in the iovec output that are not necessarily
- // exercised by random tests.
-
- // Our output blocks look like this initially (the last iovec is bigger
- // than depicted):
- // [ ] [ ] [ ] [ ] [ ]
- static const int kLengths[] = { 2, 1, 4, 8, 128 };
-
- struct iovec iov[ARRAYSIZE(kLengths)];
- for (int i = 0; i < ARRAYSIZE(kLengths); ++i) {
- iov[i].iov_base = new char[kLengths[i]];
- iov[i].iov_len = kLengths[i];
- }
-
- string compressed;
- Varint::Append32(&compressed, 22);
-
- // A literal whose output crosses three blocks.
- // [ab] [c] [123 ] [ ] [ ]
- AppendLiteral(&compressed, "abc123");
-
- // A copy whose output crosses two blocks (source and destination
- // segments marked).
- // [ab] [c] [1231] [23 ] [ ]
- // ^--^ --
- AppendCopy(&compressed, 3, 3);
-
- // A copy where the input is, at first, in the block before the output:
- //
- // [ab] [c] [1231] [231231 ] [ ]
- // ^--- ^---
- // Then during the copy, the pointers move such that the input and
- // output pointers are in the same block:
- //
- // [ab] [c] [1231] [23123123] [ ]
- // ^- ^-
- // And then they move again, so that the output pointer is no longer
- // in the same block as the input pointer:
- // [ab] [c] [1231] [23123123] [123 ]
- // ^-- ^--
- AppendCopy(&compressed, 6, 9);
-
- // Finally, a copy where the input is from several blocks back,
- // and it also crosses three blocks:
- //
- // [ab] [c] [1231] [23123123] [123b ]
- // ^ ^
- // [ab] [c] [1231] [23123123] [123bc ]
- // ^ ^
- // [ab] [c] [1231] [23123123] [123bc12 ]
- // ^- ^-
- AppendCopy(&compressed, 17, 4);
-
- CHECK(snappy::RawUncompressToIOVec(
- compressed.data(), compressed.size(), iov, ARRAYSIZE(iov)));
- CHECK_EQ(0, memcmp(iov[0].iov_base, "ab", 2));
- CHECK_EQ(0, memcmp(iov[1].iov_base, "c", 1));
- CHECK_EQ(0, memcmp(iov[2].iov_base, "1231", 4));
- CHECK_EQ(0, memcmp(iov[3].iov_base, "23123123", 8));
- CHECK_EQ(0, memcmp(iov[4].iov_base, "123bc12", 7));
-
- for (int i = 0; i < ARRAYSIZE(kLengths); ++i) {
- delete[] reinterpret_cast<char *>(iov[i].iov_base);
- }
-}
-
-TEST(Snappy, IOVecLiteralOverflow) {
- static const int kLengths[] = { 3, 4 };
-
- struct iovec iov[ARRAYSIZE(kLengths)];
- for (int i = 0; i < ARRAYSIZE(kLengths); ++i) {
- iov[i].iov_base = new char[kLengths[i]];
- iov[i].iov_len = kLengths[i];
- }
-
- string compressed;
- Varint::Append32(&compressed, 8);
-
- AppendLiteral(&compressed, "12345678");
-
- CHECK(!snappy::RawUncompressToIOVec(
- compressed.data(), compressed.size(), iov, ARRAYSIZE(iov)));
-
- for (int i = 0; i < ARRAYSIZE(kLengths); ++i) {
- delete[] reinterpret_cast<char *>(iov[i].iov_base);
- }
-}
-
-TEST(Snappy, IOVecCopyOverflow) {
- static const int kLengths[] = { 3, 4 };
-
- struct iovec iov[ARRAYSIZE(kLengths)];
- for (int i = 0; i < ARRAYSIZE(kLengths); ++i) {
- iov[i].iov_base = new char[kLengths[i]];
- iov[i].iov_len = kLengths[i];
- }
-
- string compressed;
- Varint::Append32(&compressed, 8);
-
- AppendLiteral(&compressed, "123");
- AppendCopy(&compressed, 3, 5);
-
- CHECK(!snappy::RawUncompressToIOVec(
- compressed.data(), compressed.size(), iov, ARRAYSIZE(iov)));
-
- for (int i = 0; i < ARRAYSIZE(kLengths); ++i) {
- delete[] reinterpret_cast<char *>(iov[i].iov_base);
- }
-}
-
-
-static bool CheckUncompressedLength(const string& compressed,
- size_t* ulength) {
- const bool result1 = snappy::GetUncompressedLength(compressed.data(),
- compressed.size(),
- ulength);
-
- snappy::ByteArraySource source(compressed.data(), compressed.size());
- uint32 length;
- const bool result2 = snappy::GetUncompressedLength(&source, &length);
- CHECK_EQ(result1, result2);
- return result1;
-}
-
-TEST(SnappyCorruption, TruncatedVarint) {
- string compressed, uncompressed;
- size_t ulength;
- compressed.push_back('\xf0');
- CHECK(!CheckUncompressedLength(compressed, &ulength));
- CHECK(!snappy::IsValidCompressedBuffer(compressed.data(), compressed.size()));
- CHECK(!snappy::Uncompress(compressed.data(), compressed.size(),
- &uncompressed));
-}
-
-TEST(SnappyCorruption, UnterminatedVarint) {
- string compressed, uncompressed;
- size_t ulength;
- compressed.push_back(128);
- compressed.push_back(128);
- compressed.push_back(128);
- compressed.push_back(128);
- compressed.push_back(128);
- compressed.push_back(10);
- CHECK(!CheckUncompressedLength(compressed, &ulength));
- CHECK(!snappy::IsValidCompressedBuffer(compressed.data(), compressed.size()));
- CHECK(!snappy::Uncompress(compressed.data(), compressed.size(),
- &uncompressed));
-}
-
-TEST(Snappy, ReadPastEndOfBuffer) {
- // Check that we do not read past end of input
-
- // Make a compressed string that ends with a single-byte literal
- string compressed;
- Varint::Append32(&compressed, 1);
- AppendLiteral(&compressed, "x");
-
- string uncompressed;
- DataEndingAtUnreadablePage c(compressed);
- CHECK(snappy::Uncompress(c.data(), c.size(), &uncompressed));
- CHECK_EQ(uncompressed, string("x"));
-}
-
-// Check for an infinite loop caused by a copy with offset==0
-TEST(Snappy, ZeroOffsetCopy) {
- const char* compressed = "\x40\x12\x00\x00";
- // \x40 Length (must be > kMaxIncrementCopyOverflow)
- // \x12\x00\x00 Copy with offset==0, length==5
- char uncompressed[100];
- EXPECT_FALSE(snappy::RawUncompress(compressed, 4, uncompressed));
-}
-
-TEST(Snappy, ZeroOffsetCopyValidation) {
- const char* compressed = "\x05\x12\x00\x00";
- // \x05 Length
- // \x12\x00\x00 Copy with offset==0, length==5
- EXPECT_FALSE(snappy::IsValidCompressedBuffer(compressed, 4));
-}
-
-
-namespace {
-
-int TestFindMatchLength(const char* s1, const char *s2, unsigned length) {
- return snappy::internal::FindMatchLength(s1, s2, s2 + length);
-}
-
-} // namespace
-
-TEST(Snappy, FindMatchLength) {
- // Exercise all different code paths through the function.
- // 64-bit version:
-
- // Hit s1_limit in 64-bit loop, hit s1_limit in single-character loop.
- EXPECT_EQ(6, TestFindMatchLength("012345", "012345", 6));
- EXPECT_EQ(11, TestFindMatchLength("01234567abc", "01234567abc", 11));
-
- // Hit s1_limit in 64-bit loop, find a non-match in single-character loop.
- EXPECT_EQ(9, TestFindMatchLength("01234567abc", "01234567axc", 9));
-
- // Same, but edge cases.
- EXPECT_EQ(11, TestFindMatchLength("01234567abc!", "01234567abc!", 11));
- EXPECT_EQ(11, TestFindMatchLength("01234567abc!", "01234567abc?", 11));
-
- // Find non-match at once in first loop.
- EXPECT_EQ(0, TestFindMatchLength("01234567xxxxxxxx", "?1234567xxxxxxxx", 16));
- EXPECT_EQ(1, TestFindMatchLength("01234567xxxxxxxx", "0?234567xxxxxxxx", 16));
- EXPECT_EQ(4, TestFindMatchLength("01234567xxxxxxxx", "01237654xxxxxxxx", 16));
- EXPECT_EQ(7, TestFindMatchLength("01234567xxxxxxxx", "0123456?xxxxxxxx", 16));
-
- // Find non-match in first loop after one block.
- EXPECT_EQ(8, TestFindMatchLength("abcdefgh01234567xxxxxxxx",
- "abcdefgh?1234567xxxxxxxx", 24));
- EXPECT_EQ(9, TestFindMatchLength("abcdefgh01234567xxxxxxxx",
- "abcdefgh0?234567xxxxxxxx", 24));
- EXPECT_EQ(12, TestFindMatchLength("abcdefgh01234567xxxxxxxx",
- "abcdefgh01237654xxxxxxxx", 24));
- EXPECT_EQ(15, TestFindMatchLength("abcdefgh01234567xxxxxxxx",
- "abcdefgh0123456?xxxxxxxx", 24));
-
- // 32-bit version:
-
- // Short matches.
- EXPECT_EQ(0, TestFindMatchLength("01234567", "?1234567", 8));
- EXPECT_EQ(1, TestFindMatchLength("01234567", "0?234567", 8));
- EXPECT_EQ(2, TestFindMatchLength("01234567", "01?34567", 8));
- EXPECT_EQ(3, TestFindMatchLength("01234567", "012?4567", 8));
- EXPECT_EQ(4, TestFindMatchLength("01234567", "0123?567", 8));
- EXPECT_EQ(5, TestFindMatchLength("01234567", "01234?67", 8));
- EXPECT_EQ(6, TestFindMatchLength("01234567", "012345?7", 8));
- EXPECT_EQ(7, TestFindMatchLength("01234567", "0123456?", 8));
- EXPECT_EQ(7, TestFindMatchLength("01234567", "0123456?", 7));
- EXPECT_EQ(7, TestFindMatchLength("01234567!", "0123456??", 7));
-
- // Hit s1_limit in 32-bit loop, hit s1_limit in single-character loop.
- EXPECT_EQ(10, TestFindMatchLength("xxxxxxabcd", "xxxxxxabcd", 10));
- EXPECT_EQ(10, TestFindMatchLength("xxxxxxabcd?", "xxxxxxabcd?", 10));
- EXPECT_EQ(13, TestFindMatchLength("xxxxxxabcdef", "xxxxxxabcdef", 13));
-
- // Same, but edge cases.
- EXPECT_EQ(12, TestFindMatchLength("xxxxxx0123abc!", "xxxxxx0123abc!", 12));
- EXPECT_EQ(12, TestFindMatchLength("xxxxxx0123abc!", "xxxxxx0123abc?", 12));
-
- // Hit s1_limit in 32-bit loop, find a non-match in single-character loop.
- EXPECT_EQ(11, TestFindMatchLength("xxxxxx0123abc", "xxxxxx0123axc", 13));
-
- // Find non-match at once in first loop.
- EXPECT_EQ(6, TestFindMatchLength("xxxxxx0123xxxxxxxx",
- "xxxxxx?123xxxxxxxx", 18));
- EXPECT_EQ(7, TestFindMatchLength("xxxxxx0123xxxxxxxx",
- "xxxxxx0?23xxxxxxxx", 18));
- EXPECT_EQ(8, TestFindMatchLength("xxxxxx0123xxxxxxxx",
- "xxxxxx0132xxxxxxxx", 18));
- EXPECT_EQ(9, TestFindMatchLength("xxxxxx0123xxxxxxxx",
- "xxxxxx012?xxxxxxxx", 18));
-
- // Same, but edge cases.
- EXPECT_EQ(6, TestFindMatchLength("xxxxxx0123", "xxxxxx?123", 10));
- EXPECT_EQ(7, TestFindMatchLength("xxxxxx0123", "xxxxxx0?23", 10));
- EXPECT_EQ(8, TestFindMatchLength("xxxxxx0123", "xxxxxx0132", 10));
- EXPECT_EQ(9, TestFindMatchLength("xxxxxx0123", "xxxxxx012?", 10));
-
- // Find non-match in first loop after one block.
- EXPECT_EQ(10, TestFindMatchLength("xxxxxxabcd0123xx",
- "xxxxxxabcd?123xx", 16));
- EXPECT_EQ(11, TestFindMatchLength("xxxxxxabcd0123xx",
- "xxxxxxabcd0?23xx", 16));
- EXPECT_EQ(12, TestFindMatchLength("xxxxxxabcd0123xx",
- "xxxxxxabcd0132xx", 16));
- EXPECT_EQ(13, TestFindMatchLength("xxxxxxabcd0123xx",
- "xxxxxxabcd012?xx", 16));
-
- // Same, but edge cases.
- EXPECT_EQ(10, TestFindMatchLength("xxxxxxabcd0123", "xxxxxxabcd?123", 14));
- EXPECT_EQ(11, TestFindMatchLength("xxxxxxabcd0123", "xxxxxxabcd0?23", 14));
- EXPECT_EQ(12, TestFindMatchLength("xxxxxxabcd0123", "xxxxxxabcd0132", 14));
- EXPECT_EQ(13, TestFindMatchLength("xxxxxxabcd0123", "xxxxxxabcd012?", 14));
-}
-
-TEST(Snappy, FindMatchLengthRandom) {
- const int kNumTrials = 10000;
- const int kTypicalLength = 10;
- ACMRandom rnd(FLAGS_test_random_seed);
-
- for (int i = 0; i < kNumTrials; i++) {
- string s, t;
- char a = rnd.Rand8();
- char b = rnd.Rand8();
- while (!rnd.OneIn(kTypicalLength)) {
- s.push_back(rnd.OneIn(2) ? a : b);
- t.push_back(rnd.OneIn(2) ? a : b);
- }
- DataEndingAtUnreadablePage u(s);
- DataEndingAtUnreadablePage v(t);
- int matched = snappy::internal::FindMatchLength(
- u.data(), v.data(), v.data() + t.size());
- if (matched == t.size()) {
- EXPECT_EQ(s, t);
- } else {
- EXPECT_NE(s[matched], t[matched]);
- for (int j = 0; j < matched; j++) {
- EXPECT_EQ(s[j], t[j]);
- }
- }
- }
-}
-
-
-static void CompressFile(const char* fname) {
- string fullinput;
- file::GetContents(fname, &fullinput, file::Defaults()).CheckSuccess();
-
- string compressed;
- Compress(fullinput.data(), fullinput.size(), SNAPPY, &compressed, false);
-
- file::SetContents(string(fname).append(".comp"), compressed, file::Defaults())
- .CheckSuccess();
-}
-
-static void UncompressFile(const char* fname) {
- string fullinput;
- file::GetContents(fname, &fullinput, file::Defaults()).CheckSuccess();
-
- size_t uncompLength;
- CHECK(CheckUncompressedLength(fullinput, &uncompLength));
-
- string uncompressed;
- uncompressed.resize(uncompLength);
- CHECK(snappy::Uncompress(fullinput.data(), fullinput.size(), &uncompressed));
-
- file::SetContents(string(fname).append(".uncomp"), uncompressed,
- file::Defaults()).CheckSuccess();
-}
-
-static void MeasureFile(const char* fname) {
- string fullinput;
- file::GetContents(fname, &fullinput, file::Defaults()).CheckSuccess();
- printf("%-40s :\n", fname);
-
- int start_len = (FLAGS_start_len < 0) ? fullinput.size() : FLAGS_start_len;
- int end_len = fullinput.size();
- if (FLAGS_end_len >= 0) {
- end_len = min<int>(fullinput.size(), FLAGS_end_len);
- }
- for (int len = start_len; len <= end_len; len++) {
- const char* const input = fullinput.data();
- int repeats = (FLAGS_bytes + len) / (len + 1);
- if (FLAGS_zlib) Measure(input, len, ZLIB, repeats, 1024<<10);
- if (FLAGS_lzo) Measure(input, len, LZO, repeats, 1024<<10);
- if (FLAGS_liblzf) Measure(input, len, LIBLZF, repeats, 1024<<10);
- if (FLAGS_quicklz) Measure(input, len, QUICKLZ, repeats, 1024<<10);
- if (FLAGS_fastlz) Measure(input, len, FASTLZ, repeats, 1024<<10);
- if (FLAGS_snappy) Measure(input, len, SNAPPY, repeats, 4096<<10);
-
- // For block-size based measurements
- if (0 && FLAGS_snappy) {
- Measure(input, len, SNAPPY, repeats, 8<<10);
- Measure(input, len, SNAPPY, repeats, 16<<10);
- Measure(input, len, SNAPPY, repeats, 32<<10);
- Measure(input, len, SNAPPY, repeats, 64<<10);
- Measure(input, len, SNAPPY, repeats, 256<<10);
- Measure(input, len, SNAPPY, repeats, 1024<<10);
- }
- }
-}
-
-static struct {
- const char* label;
- const char* filename;
- size_t size_limit;
-} files[] = {
- { "html", "html", 0 },
- { "urls", "urls.10K", 0 },
- { "jpg", "fireworks.jpeg", 0 },
- { "jpg_200", "fireworks.jpeg", 200 },
- { "pdf", "paper-100k.pdf", 0 },
- { "html4", "html_x_4", 0 },
- { "txt1", "alice29.txt", 0 },
- { "txt2", "asyoulik.txt", 0 },
- { "txt3", "lcet10.txt", 0 },
- { "txt4", "plrabn12.txt", 0 },
- { "pb", "geo.protodata", 0 },
- { "gaviota", "kppkn.gtb", 0 },
-};
-
-static void BM_UFlat(int iters, int arg) {
- StopBenchmarkTiming();
-
- // Pick file to process based on "arg"
- CHECK_GE(arg, 0);
- CHECK_LT(arg, ARRAYSIZE(files));
- string contents = ReadTestDataFile(files[arg].filename,
- files[arg].size_limit);
-
- string zcontents;
- snappy::Compress(contents.data(), contents.size(), &zcontents);
- char* dst = new char[contents.size()];
-
- SetBenchmarkBytesProcessed(static_cast<int64>(iters) *
- static_cast<int64>(contents.size()));
- SetBenchmarkLabel(files[arg].label);
- StartBenchmarkTiming();
- while (iters-- > 0) {
- CHECK(snappy::RawUncompress(zcontents.data(), zcontents.size(), dst));
- }
- StopBenchmarkTiming();
-
- delete[] dst;
-}
-BENCHMARK(BM_UFlat)->DenseRange(0, ARRAYSIZE(files) - 1);
-
-static void BM_UValidate(int iters, int arg) {
- StopBenchmarkTiming();
-
- // Pick file to process based on "arg"
- CHECK_GE(arg, 0);
- CHECK_LT(arg, ARRAYSIZE(files));
- string contents = ReadTestDataFile(files[arg].filename,
- files[arg].size_limit);
-
- string zcontents;
- snappy::Compress(contents.data(), contents.size(), &zcontents);
-
- SetBenchmarkBytesProcessed(static_cast<int64>(iters) *
- static_cast<int64>(contents.size()));
- SetBenchmarkLabel(files[arg].label);
- StartBenchmarkTiming();
- while (iters-- > 0) {
- CHECK(snappy::IsValidCompressedBuffer(zcontents.data(), zcontents.size()));
- }
- StopBenchmarkTiming();
-}
-BENCHMARK(BM_UValidate)->DenseRange(0, 4);
-
-static void BM_UIOVec(int iters, int arg) {
- StopBenchmarkTiming();
-
- // Pick file to process based on "arg"
- CHECK_GE(arg, 0);
- CHECK_LT(arg, ARRAYSIZE(files));
- string contents = ReadTestDataFile(files[arg].filename,
- files[arg].size_limit);
-
- string zcontents;
- snappy::Compress(contents.data(), contents.size(), &zcontents);
-
- // Uncompress into an iovec containing ten entries.
- const int kNumEntries = 10;
- struct iovec iov[kNumEntries];
- char *dst = new char[contents.size()];
- int used_so_far = 0;
- for (int i = 0; i < kNumEntries; ++i) {
- iov[i].iov_base = dst + used_so_far;
- if (used_so_far == contents.size()) {
- iov[i].iov_len = 0;
- continue;
- }
-
- if (i == kNumEntries - 1) {
- iov[i].iov_len = contents.size() - used_so_far;
- } else {
- iov[i].iov_len = contents.size() / kNumEntries;
- }
- used_so_far += iov[i].iov_len;
- }
-
- SetBenchmarkBytesProcessed(static_cast<int64>(iters) *
- static_cast<int64>(contents.size()));
- SetBenchmarkLabel(files[arg].label);
- StartBenchmarkTiming();
- while (iters-- > 0) {
- CHECK(snappy::RawUncompressToIOVec(zcontents.data(), zcontents.size(), iov,
- kNumEntries));
- }
- StopBenchmarkTiming();
-
- delete[] dst;
-}
-BENCHMARK(BM_UIOVec)->DenseRange(0, 4);
-
-
-static void BM_ZFlat(int iters, int arg) {
- StopBenchmarkTiming();
-
- // Pick file to process based on "arg"
- CHECK_GE(arg, 0);
- CHECK_LT(arg, ARRAYSIZE(files));
- string contents = ReadTestDataFile(files[arg].filename,
- files[arg].size_limit);
-
- char* dst = new char[snappy::MaxCompressedLength(contents.size())];
-
- SetBenchmarkBytesProcessed(static_cast<int64>(iters) *
- static_cast<int64>(contents.size()));
- StartBenchmarkTiming();
-
- size_t zsize = 0;
- while (iters-- > 0) {
- snappy::RawCompress(contents.data(), contents.size(), dst, &zsize);
- }
- StopBenchmarkTiming();
- const double compression_ratio =
- static_cast<double>(zsize) / std::max<size_t>(1, contents.size());
- SetBenchmarkLabel(StringPrintf("%s (%.2f %%)",
- files[arg].label, 100.0 * compression_ratio));
- VLOG(0) << StringPrintf("compression for %s: %zd -> %zd bytes",
- files[arg].label, contents.size(), zsize);
- delete[] dst;
-}
-BENCHMARK(BM_ZFlat)->DenseRange(0, ARRAYSIZE(files) - 1);
-
-
-} // namespace snappy
-
-
-int main(int argc, char** argv) {
- InitGoogle(argv[0], &argc, &argv, true);
- RunSpecifiedBenchmarks();
-
-
- if (argc >= 2) {
- for (int arg = 1; arg < argc; arg++) {
- if (FLAGS_write_compressed) {
- CompressFile(argv[arg]);
- } else if (FLAGS_write_uncompressed) {
- UncompressFile(argv[arg]);
- } else {
- MeasureFile(argv[arg]);
- }
- }
- return 0;
- }
-
- return RUN_ALL_TESTS();
-}
[46/51] [partial] orc git commit: ORC-204 Update and use CMake
External Project to build C++ compression libraries.
Posted by om...@apache.org.
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/snappy-1.1.2/ChangeLog
----------------------------------------------------------------------
diff --git a/c++/libs/snappy-1.1.2/ChangeLog b/c++/libs/snappy-1.1.2/ChangeLog
deleted file mode 100644
index edd46dd..0000000
--- a/c++/libs/snappy-1.1.2/ChangeLog
+++ /dev/null
@@ -1,1916 +0,0 @@
-------------------------------------------------------------------------
-r83 | snappy.mirrorbot@gmail.com | 2014-02-19 11:31:49 +0100 (Wed, 19 Feb 2014) | 9 lines
-
-Fix public issue 82: Stop distributing benchmark data files that have
-unclear or unsuitable licensing.
-
-In general, we replace the files we can with liberally licensed data,
-and remove all the others (in particular all the parts of the Canterbury
-corpus that are not clearly in the public domain). The replacements
-do not always have the exact same characteristics as the original ones,
-but they are more than good enough to be useful for benchmarking.
-
-------------------------------------------------------------------------
-r82 | snappy.mirrorbot@gmail.com | 2013-10-25 15:31:27 +0200 (Fri, 25 Oct 2013) | 8 lines
-
-Add support for padding in the Snappy framed format.
-
-This is specifically motivated by DICOM's demands that embedded data
-must be of an even number of bytes, but could in principle be used for
-any sort of padding/alignment needed.
-
-R=sanjay
-
-------------------------------------------------------------------------
-r81 | snappy.mirrorbot@gmail.com | 2013-10-15 17:21:31 +0200 (Tue, 15 Oct 2013) | 4 lines
-
-Release Snappy 1.1.1.
-
-R=jeff
-
-------------------------------------------------------------------------
-r80 | snappy.mirrorbot@gmail.com | 2013-08-13 14:55:00 +0200 (Tue, 13 Aug 2013) | 6 lines
-
-Add autoconf tests for size_t and ssize_t. Sort-of resolves public issue 79;
-it would solve the problem if MSVC typically used autoconf. However, it gives
-a natural place (config.h) to put the typedef even for MSVC.
-
-R=jsbell
-
-------------------------------------------------------------------------
-r79 | snappy.mirrorbot@gmail.com | 2013-07-29 13:06:44 +0200 (Mon, 29 Jul 2013) | 14 lines
-
-When we compare the number of bytes produced with the offset for a
-backreference, make the signedness of the bytes produced clear,
-by sticking it into a size_t. This avoids a signed/unsigned compare
-warning from MSVC (public issue 71), and also is slightly clearer.
-
-Since the line is now so long the explanatory comment about the -1u
-trick has to go somewhere else anyway, I used the opportunity to
-explain it in slightly more detail.
-
-This is a purely stylistic change; the emitted assembler from GCC
-is identical.
-
-R=jeff
-
-------------------------------------------------------------------------
-r78 | snappy.mirrorbot@gmail.com | 2013-06-30 21:24:03 +0200 (Sun, 30 Jun 2013) | 111 lines
-
-In the fast path for decompressing literals, instead of checking
-whether there's 16 bytes free and then checking right afterwards
-(when having subtracted the literal size) that there are now
-5 bytes free, just check once for 21 bytes. This skips a compare
-and a branch; although it is easily predictable, it is still
-a few cycles on a fast path that we would like to get rid of.
-
-Benchmarking this yields very confusing results. On open-source
-GCC 4.8.1 on Haswell, we get exactly the expected results; the
-benchmarks where we hit the fast path for literals (in particular
-the two HTML benchmarks and the protobuf benchmark) give very nice
-speedups, and the others are not really affected.
-
-However, benchmarks with Google's GCC branch on other hardware
-is much less clear. It seems that we have a weak loss in some cases
-(and the win for the “typical” win cases are not nearly as clear),
-but that it depends on microarchitecture and plain luck in how we run
-the benchmark. Looking at the generated assembler, it seems that
-the removal of the if causes other large-scale changes in how the
-function is laid out, which makes it likely that this is just bad luck.
-
-Thus, we should keep this change, even though its exact current impact is
-unclear; it's a sensible change per se, and dropping it on the basis of
-microoptimization for a given compiler (or even branch of a compiler)
-would seem like a bad strategy in the long run.
-
-Microbenchmark results (all in 64-bit, opt mode):
-
- Nehalem, Google GCC:
-
- Benchmark Base (ns) New (ns) Improvement
- ------------------------------------------------------------------------------
- BM_UFlat/0 76747 75591 1.3GB/s html +1.5%
- BM_UFlat/1 765756 757040 886.3MB/s urls +1.2%
- BM_UFlat/2 10867 10893 10.9GB/s jpg -0.2%
- BM_UFlat/3 124 131 1.4GB/s jpg_200 -5.3%
- BM_UFlat/4 31663 31596 2.8GB/s pdf +0.2%
- BM_UFlat/5 314162 308176 1.2GB/s html4 +1.9%
- BM_UFlat/6 29668 29746 790.6MB/s cp -0.3%
- BM_UFlat/7 12958 13386 796.4MB/s c -3.2%
- BM_UFlat/8 3596 3682 966.0MB/s lsp -2.3%
- BM_UFlat/9 1019193 1033493 953.3MB/s xls -1.4%
- BM_UFlat/10 239 247 775.3MB/s xls_200 -3.2%
- BM_UFlat/11 236411 240271 606.9MB/s txt1 -1.6%
- BM_UFlat/12 206639 209768 571.2MB/s txt2 -1.5%
- BM_UFlat/13 627803 635722 641.4MB/s txt3 -1.2%
- BM_UFlat/14 845932 857816 538.2MB/s txt4 -1.4%
- BM_UFlat/15 402107 391670 1.2GB/s bin +2.7%
- BM_UFlat/16 283 279 683.6MB/s bin_200 +1.4%
- BM_UFlat/17 46070 46815 781.5MB/s sum -1.6%
- BM_UFlat/18 5053 5163 782.0MB/s man -2.1%
- BM_UFlat/19 79721 76581 1.4GB/s pb +4.1%
- BM_UFlat/20 251158 252330 697.5MB/s gaviota -0.5%
- Sum of all benchmarks 4966150 4980396 -0.3%
-
-
- Sandy Bridge, Google GCC:
-
- Benchmark Base (ns) New (ns) Improvement
- ------------------------------------------------------------------------------
- BM_UFlat/0 42850 42182 2.3GB/s html +1.6%
- BM_UFlat/1 525660 515816 1.3GB/s urls +1.9%
- BM_UFlat/2 7173 7283 16.3GB/s jpg -1.5%
- BM_UFlat/3 92 91 2.1GB/s jpg_200 +1.1%
- BM_UFlat/4 15147 14872 5.9GB/s pdf +1.8%
- BM_UFlat/5 199936 192116 2.0GB/s html4 +4.1%
- BM_UFlat/6 12796 12443 1.8GB/s cp +2.8%
- BM_UFlat/7 6588 6400 1.6GB/s c +2.9%
- BM_UFlat/8 2010 1951 1.8GB/s lsp +3.0%
- BM_UFlat/9 761124 763049 1.3GB/s xls -0.3%
- BM_UFlat/10 186 189 1016.1MB/s xls_200 -1.6%
- BM_UFlat/11 159354 158460 918.6MB/s txt1 +0.6%
- BM_UFlat/12 139732 139950 856.1MB/s txt2 -0.2%
- BM_UFlat/13 429917 425027 961.7MB/s txt3 +1.2%
- BM_UFlat/14 585255 587324 785.8MB/s txt4 -0.4%
- BM_UFlat/15 276186 266173 1.8GB/s bin +3.8%
- BM_UFlat/16 205 207 925.5MB/s bin_200 -1.0%
- BM_UFlat/17 24925 24935 1.4GB/s sum -0.0%
- BM_UFlat/18 2632 2576 1.5GB/s man +2.2%
- BM_UFlat/19 40546 39108 2.8GB/s pb +3.7%
- BM_UFlat/20 175803 168209 1048.9MB/s gaviota +4.5%
- Sum of all benchmarks 3408117 3368361 +1.2%
-
-
- Haswell, upstream GCC 4.8.1:
-
- Benchmark Base (ns) New (ns) Improvement
- ------------------------------------------------------------------------------
- BM_UFlat/0 46308 40641 2.3GB/s html +13.9%
- BM_UFlat/1 513385 514706 1.3GB/s urls -0.3%
- BM_UFlat/2 6197 6151 19.2GB/s jpg +0.7%
- BM_UFlat/3 61 61 3.0GB/s jpg_200 +0.0%
- BM_UFlat/4 13551 13429 6.5GB/s pdf +0.9%
- BM_UFlat/5 198317 190243 2.0GB/s html4 +4.2%
- BM_UFlat/6 14768 12560 1.8GB/s cp +17.6%
- BM_UFlat/7 6453 6447 1.6GB/s c +0.1%
- BM_UFlat/8 1991 1980 1.8GB/s lsp +0.6%
- BM_UFlat/9 766947 770424 1.2GB/s xls -0.5%
- BM_UFlat/10 170 169 1.1GB/s xls_200 +0.6%
- BM_UFlat/11 164350 163554 888.7MB/s txt1 +0.5%
- BM_UFlat/12 145444 143830 832.1MB/s txt2 +1.1%
- BM_UFlat/13 437849 438413 929.2MB/s txt3 -0.1%
- BM_UFlat/14 603587 605309 759.8MB/s txt4 -0.3%
- BM_UFlat/15 249799 248067 1.9GB/s bin +0.7%
- BM_UFlat/16 191 188 1011.4MB/s bin_200 +1.6%
- BM_UFlat/17 26064 24778 1.4GB/s sum +5.2%
- BM_UFlat/18 2620 2601 1.5GB/s man +0.7%
- BM_UFlat/19 44551 37373 3.0GB/s pb +19.2%
- BM_UFlat/20 165408 164584 1.0GB/s gaviota +0.5%
- Sum of all benchmarks 3408011 3385508 +0.7%
-
-------------------------------------------------------------------------
-r77 | snappy.mirrorbot@gmail.com | 2013-06-14 23:42:26 +0200 (Fri, 14 Jun 2013) | 92 lines
-
-Make the two IncrementalCopy* functions take in an ssize_t instead of a len,
-in order to avoid having to do 32-to-64-bit signed conversions on a hot path
-during decompression. (Also fixes some MSVC warnings, mentioned in public
-issue 75, but more of those remain.) They cannot be size_t because we expect
-them to go negative and test for that.
-
-This saves a few movzwl instructions, yielding ~2% speedup in decompression.
-
-
-Sandy Bridge:
-
-Benchmark Base (ns) New (ns) Improvement
--------------------------------------------------------------------------------------------------
-BM_UFlat/0 48009 41283 2.3GB/s html +16.3%
-BM_UFlat/1 531274 513419 1.3GB/s urls +3.5%
-BM_UFlat/2 7378 7062 16.8GB/s jpg +4.5%
-BM_UFlat/3 92 92 2.0GB/s jpg_200 +0.0%
-BM_UFlat/4 15057 14974 5.9GB/s pdf +0.6%
-BM_UFlat/5 204323 193140 2.0GB/s html4 +5.8%
-BM_UFlat/6 13282 12611 1.8GB/s cp +5.3%
-BM_UFlat/7 6511 6504 1.6GB/s c +0.1%
-BM_UFlat/8 2014 2030 1.7GB/s lsp -0.8%
-BM_UFlat/9 775909 768336 1.3GB/s xls +1.0%
-BM_UFlat/10 182 184 1043.2MB/s xls_200 -1.1%
-BM_UFlat/11 167352 161630 901.2MB/s txt1 +3.5%
-BM_UFlat/12 147393 142246 842.8MB/s txt2 +3.6%
-BM_UFlat/13 449960 432853 944.4MB/s txt3 +4.0%
-BM_UFlat/14 620497 594845 775.9MB/s txt4 +4.3%
-BM_UFlat/15 265610 267356 1.8GB/s bin -0.7%
-BM_UFlat/16 206 205 932.7MB/s bin_200 +0.5%
-BM_UFlat/17 25561 24730 1.4GB/s sum +3.4%
-BM_UFlat/18 2620 2644 1.5GB/s man -0.9%
-BM_UFlat/19 45766 38589 2.9GB/s pb +18.6%
-BM_UFlat/20 171107 169832 1039.5MB/s gaviota +0.8%
-Sum of all benchmarks 3500103 3394565 +3.1%
-
-
-Westmere:
-
-Benchmark Base (ns) New (ns) Improvement
--------------------------------------------------------------------------------------------------
-BM_UFlat/0 72624 71526 1.3GB/s html +1.5%
-BM_UFlat/1 735821 722917 930.8MB/s urls +1.8%
-BM_UFlat/2 10450 10172 11.7GB/s jpg +2.7%
-BM_UFlat/3 117 117 1.6GB/s jpg_200 +0.0%
-BM_UFlat/4 29817 29648 3.0GB/s pdf +0.6%
-BM_UFlat/5 297126 293073 1.3GB/s html4 +1.4%
-BM_UFlat/6 28252 27994 842.0MB/s cp +0.9%
-BM_UFlat/7 12672 12391 862.1MB/s c +2.3%
-BM_UFlat/8 3507 3425 1040.9MB/s lsp +2.4%
-BM_UFlat/9 1004268 969395 1018.0MB/s xls +3.6%
-BM_UFlat/10 233 227 844.8MB/s xls_200 +2.6%
-BM_UFlat/11 230054 224981 647.8MB/s txt1 +2.3%
-BM_UFlat/12 201229 196447 610.5MB/s txt2 +2.4%
-BM_UFlat/13 609547 596761 685.3MB/s txt3 +2.1%
-BM_UFlat/14 824362 804821 573.8MB/s txt4 +2.4%
-BM_UFlat/15 371095 374899 1.3GB/s bin -1.0%
-BM_UFlat/16 267 267 717.8MB/s bin_200 +0.0%
-BM_UFlat/17 44623 43828 835.9MB/s sum +1.8%
-BM_UFlat/18 5077 4815 841.0MB/s man +5.4%
-BM_UFlat/19 74964 73210 1.5GB/s pb +2.4%
-BM_UFlat/20 237987 236745 746.0MB/s gaviota +0.5%
-Sum of all benchmarks 4794092 4697659 +2.1%
-
-
-Istanbul:
-
-Benchmark Base (ns) New (ns) Improvement
--------------------------------------------------------------------------------------------------
-BM_UFlat/0 98614 96376 1020.4MB/s html +2.3%
-BM_UFlat/1 963740 953241 707.2MB/s urls +1.1%
-BM_UFlat/2 25042 24769 4.8GB/s jpg +1.1%
-BM_UFlat/3 180 180 1065.6MB/s jpg_200 +0.0%
-BM_UFlat/4 45942 45403 1.9GB/s pdf +1.2%
-BM_UFlat/5 400135 390226 1008.2MB/s html4 +2.5%
-BM_UFlat/6 37768 37392 631.9MB/s cp +1.0%
-BM_UFlat/7 18585 18200 588.2MB/s c +2.1%
-BM_UFlat/8 5751 5690 627.7MB/s lsp +1.1%
-BM_UFlat/9 1543154 1542209 641.4MB/s xls +0.1%
-BM_UFlat/10 381 388 494.6MB/s xls_200 -1.8%
-BM_UFlat/11 339715 331973 440.1MB/s txt1 +2.3%
-BM_UFlat/12 294807 289418 415.4MB/s txt2 +1.9%
-BM_UFlat/13 906160 884094 463.3MB/s txt3 +2.5%
-BM_UFlat/14 1224221 1198435 386.1MB/s txt4 +2.2%
-BM_UFlat/15 516277 502923 979.5MB/s bin +2.7%
-BM_UFlat/16 405 402 477.2MB/s bin_200 +0.7%
-BM_UFlat/17 61640 60621 605.6MB/s sum +1.7%
-BM_UFlat/18 7326 7383 549.5MB/s man -0.8%
-BM_UFlat/19 94720 92653 1.2GB/s pb +2.2%
-BM_UFlat/20 360435 346687 510.6MB/s gaviota +4.0%
-Sum of all benchmarks 6944998 6828663 +1.7%
-
-------------------------------------------------------------------------
-r76 | snappy.mirrorbot@gmail.com | 2013-06-13 18:19:52 +0200 (Thu, 13 Jun 2013) | 9 lines
-
-Add support for uncompressing to iovecs (scatter I/O).
-Windows does not have struct iovec defined anywhere,
-so we define our own version that's equal to what UNIX
-typically has.
-
-The bulk of this patch was contributed by Mohit Aron.
-
-R=jeff
-
-------------------------------------------------------------------------
-r75 | snappy.mirrorbot@gmail.com | 2013-06-12 21:51:15 +0200 (Wed, 12 Jun 2013) | 4 lines
-
-Some code reorganization needed for an internal change.
-
-R=fikes
-
-------------------------------------------------------------------------
-r74 | snappy.mirrorbot@gmail.com | 2013-04-09 17:33:30 +0200 (Tue, 09 Apr 2013) | 4 lines
-
-Supports truncated test data in zippy benchmark.
-
-R=sesse
-
-------------------------------------------------------------------------
-r73 | snappy.mirrorbot@gmail.com | 2013-02-05 15:36:15 +0100 (Tue, 05 Feb 2013) | 4 lines
-
-Release Snappy 1.1.0.
-
-R=sanjay
-
-------------------------------------------------------------------------
-r72 | snappy.mirrorbot@gmail.com | 2013-02-05 15:30:05 +0100 (Tue, 05 Feb 2013) | 9 lines
-
-Make ./snappy_unittest pass without "srcdir" being defined.
-
-Previously, snappy_unittests would read from an absolute path /testdata/..;
-convert it to use a relative path instead.
-
-Patch from Marc-Antonie Ruel.
-
-R=maruel
-
-------------------------------------------------------------------------
-r71 | snappy.mirrorbot@gmail.com | 2013-01-18 13:16:36 +0100 (Fri, 18 Jan 2013) | 287 lines
-
-Increase the Zippy block size from 32 kB to 64 kB, winning ~3% density
-while being effectively performance neutral.
-
-The longer story about density is that we win 3-6% density on the benchmarks
-where this has any effect at all; many of the benchmarks (cp, c, lsp, man)
-are smaller than 32 kB and thus will have no effect. Binary data also seems
-to win little or nothing; of course, the already-compressed data wins nothing.
-The protobuf benchmark wins as much as ~18% depending on architecture,
-but I wouldn't be too sure that this is representative of protobuf data in
-general.
-
-As of performance, we lose a tiny amount since we get more tags (e.g., a long
-literal might be broken up into literal-copy-literal), but we win it back with
-less clearing of the hash table, and more opportunities to skip incompressible
-data (e.g. in the jpg benchmark). Decompression seems to get ever so slightly
-slower, again due to more tags. The total net change is about as close to zero
-as we can get, so the end effect seems to be simply more density and no
-real performance change.
-
-The comment about not changing kBlockSize, scary as it is, is not really
-relevant, since we're never going to have a block-level decompressor without
-explicitly marked blocks. Replace it with something more appropriate.
-
-This affects the framing format, but it's okay to change it since it basically
-has no users yet.
-
-
-Density (note that cp, c, lsp and man are all smaller than 32 kB):
-
- Benchmark Description Base (%) New (%) Improvement
- --------------------------------------------------------------
- ZFlat/0 html 22.57 22.31 +5.6%
- ZFlat/1 urls 50.89 47.77 +6.5%
- ZFlat/2 jpg 99.88 99.87 +0.0%
- ZFlat/3 pdf 82.13 82.07 +0.1%
- ZFlat/4 html4 23.55 22.51 +4.6%
- ZFlat/5 cp 48.12 48.12 +0.0%
- ZFlat/6 c 42.40 42.40 +0.0%
- ZFlat/7 lsp 48.37 48.37 +0.0%
- ZFlat/8 xls 41.34 41.23 +0.3%
- ZFlat/9 txt1 59.81 57.87 +3.4%
- ZFlat/10 txt2 64.07 61.93 +3.5%
- ZFlat/11 txt3 57.11 54.92 +4.0%
- ZFlat/12 txt4 68.35 66.22 +3.2%
- ZFlat/13 bin 18.21 18.11 +0.6%
- ZFlat/14 sum 51.88 48.96 +6.0%
- ZFlat/15 man 59.36 59.36 +0.0%
- ZFlat/16 pb 23.15 19.64 +17.9%
- ZFlat/17 gaviota 38.27 37.72 +1.5%
- Geometric mean 45.51 44.15 +3.1%
-
-
-Microbenchmarks (64-bit, opt):
-
-Westmere 2.8 GHz:
-
- Benchmark Base (ns) New (ns) Improvement
- -------------------------------------------------------------------------------------------------
- BM_UFlat/0 75342 75027 1.3GB/s html +0.4%
- BM_UFlat/1 723767 744269 899.6MB/s urls -2.8%
- BM_UFlat/2 10072 10072 11.7GB/s jpg +0.0%
- BM_UFlat/3 30747 30388 2.9GB/s pdf +1.2%
- BM_UFlat/4 307353 306063 1.2GB/s html4 +0.4%
- BM_UFlat/5 28593 28743 816.3MB/s cp -0.5%
- BM_UFlat/6 12958 12998 818.1MB/s c -0.3%
- BM_UFlat/7 3700 3792 935.8MB/s lsp -2.4%
- BM_UFlat/8 999685 999905 982.1MB/s xls -0.0%
- BM_UFlat/9 232954 230079 630.4MB/s txt1 +1.2%
- BM_UFlat/10 200785 201468 592.6MB/s txt2 -0.3%
- BM_UFlat/11 617267 610968 666.1MB/s txt3 +1.0%
- BM_UFlat/12 821595 822475 558.7MB/s txt4 -0.1%
- BM_UFlat/13 377097 377632 1.3GB/s bin -0.1%
- BM_UFlat/14 45476 45260 805.8MB/s sum +0.5%
- BM_UFlat/15 4985 5003 805.7MB/s man -0.4%
- BM_UFlat/16 80813 77494 1.4GB/s pb +4.3%
- BM_UFlat/17 251792 241553 727.7MB/s gaviota +4.2%
- BM_UValidate/0 40343 40354 2.4GB/s html -0.0%
- BM_UValidate/1 426890 451574 1.4GB/s urls -5.5%
- BM_UValidate/2 187 179 661.9GB/s jpg +4.5%
- BM_UValidate/3 13783 13827 6.4GB/s pdf -0.3%
- BM_UValidate/4 162393 163335 2.3GB/s html4 -0.6%
- BM_UDataBuffer/0 93756 93302 1046.7MB/s html +0.5%
- BM_UDataBuffer/1 886714 916292 730.7MB/s urls -3.2%
- BM_UDataBuffer/2 15861 16401 7.2GB/s jpg -3.3%
- BM_UDataBuffer/3 38934 39224 2.2GB/s pdf -0.7%
- BM_UDataBuffer/4 381008 379428 1029.5MB/s html4 +0.4%
- BM_UCord/0 92528 91098 1072.0MB/s html +1.6%
- BM_UCord/1 858421 885287 756.3MB/s urls -3.0%
- BM_UCord/2 13140 13464 8.8GB/s jpg -2.4%
- BM_UCord/3 39012 37773 2.3GB/s pdf +3.3%
- BM_UCord/4 376869 371267 1052.1MB/s html4 +1.5%
- BM_UCordString/0 75810 75303 1.3GB/s html +0.7%
- BM_UCordString/1 735290 753841 888.2MB/s urls -2.5%
- BM_UCordString/2 11945 13113 9.0GB/s jpg -8.9%
- BM_UCordString/3 33901 32562 2.7GB/s pdf +4.1%
- BM_UCordString/4 310985 309390 1.2GB/s html4 +0.5%
- BM_UCordValidate/0 40952 40450 2.4GB/s html +1.2%
- BM_UCordValidate/1 433842 456531 1.4GB/s urls -5.0%
- BM_UCordValidate/2 1179 1173 100.8GB/s jpg +0.5%
- BM_UCordValidate/3 14481 14392 6.1GB/s pdf +0.6%
- BM_UCordValidate/4 164364 164151 2.3GB/s html4 +0.1%
- BM_ZFlat/0 160610 156601 623.6MB/s html (22.31 %) +2.6%
- BM_ZFlat/1 1995238 1993582 335.9MB/s urls (47.77 %) +0.1%
- BM_ZFlat/2 30133 24983 4.7GB/s jpg (99.87 %) +20.6%
- BM_ZFlat/3 74453 73128 1.2GB/s pdf (82.07 %) +1.8%
- BM_ZFlat/4 647674 633729 616.4MB/s html4 (22.51 %) +2.2%
- BM_ZFlat/5 76259 76090 308.4MB/s cp (48.12 %) +0.2%
- BM_ZFlat/6 31106 31084 342.1MB/s c (42.40 %) +0.1%
- BM_ZFlat/7 10507 10443 339.8MB/s lsp (48.37 %) +0.6%
- BM_ZFlat/8 1811047 1793325 547.6MB/s xls (41.23 %) +1.0%
- BM_ZFlat/9 597903 581793 249.3MB/s txt1 (57.87 %) +2.8%
- BM_ZFlat/10 525320 514522 232.0MB/s txt2 (61.93 %) +2.1%
- BM_ZFlat/11 1596591 1551636 262.3MB/s txt3 (54.92 %) +2.9%
- BM_ZFlat/12 2134523 2094033 219.5MB/s txt4 (66.22 %) +1.9%
- BM_ZFlat/13 593024 587869 832.6MB/s bin (18.11 %) +0.9%
- BM_ZFlat/14 114746 110666 329.5MB/s sum (48.96 %) +3.7%
- BM_ZFlat/15 14376 14485 278.3MB/s man (59.36 %) -0.8%
- BM_ZFlat/16 167908 150070 753.6MB/s pb (19.64 %) +11.9%
- BM_ZFlat/17 460228 442253 397.5MB/s gaviota (37.72 %) +4.1%
- BM_ZCord/0 164896 160241 609.4MB/s html +2.9%
- BM_ZCord/1 2070239 2043492 327.7MB/s urls +1.3%
- BM_ZCord/2 54402 47002 2.5GB/s jpg +15.7%
- BM_ZCord/3 85871 83832 1073.1MB/s pdf +2.4%
- BM_ZCord/4 664078 648825 602.0MB/s html4 +2.4%
- BM_ZDataBuffer/0 174874 172549 566.0MB/s html +1.3%
- BM_ZDataBuffer/1 2134410 2139173 313.0MB/s urls -0.2%
- BM_ZDataBuffer/2 71911 69551 1.7GB/s jpg +3.4%
- BM_ZDataBuffer/3 98236 99727 902.1MB/s pdf -1.5%
- BM_ZDataBuffer/4 710776 699104 558.8MB/s html4 +1.7%
- Sum of all benchmarks 27358908 27200688 +0.6%
-
-
-Sandy Bridge 2.6 GHz:
-
- Benchmark Base (ns) New (ns) Improvement
- -------------------------------------------------------------------------------------------------
- BM_UFlat/0 49356 49018 1.9GB/s html +0.7%
- BM_UFlat/1 516764 531955 1.2GB/s urls -2.9%
- BM_UFlat/2 6982 7304 16.2GB/s jpg -4.4%
- BM_UFlat/3 15285 15598 5.6GB/s pdf -2.0%
- BM_UFlat/4 206557 206669 1.8GB/s html4 -0.1%
- BM_UFlat/5 13681 13567 1.7GB/s cp +0.8%
- BM_UFlat/6 6571 6592 1.6GB/s c -0.3%
- BM_UFlat/7 2008 1994 1.7GB/s lsp +0.7%
- BM_UFlat/8 775700 773286 1.2GB/s xls +0.3%
- BM_UFlat/9 165578 164480 881.8MB/s txt1 +0.7%
- BM_UFlat/10 143707 144139 828.2MB/s txt2 -0.3%
- BM_UFlat/11 443026 436281 932.8MB/s txt3 +1.5%
- BM_UFlat/12 603129 595856 771.2MB/s txt4 +1.2%
- BM_UFlat/13 271682 270450 1.8GB/s bin +0.5%
- BM_UFlat/14 26200 25666 1.4GB/s sum +2.1%
- BM_UFlat/15 2620 2608 1.5GB/s man +0.5%
- BM_UFlat/16 48908 47756 2.3GB/s pb +2.4%
- BM_UFlat/17 174638 170346 1031.9MB/s gaviota +2.5%
- BM_UValidate/0 31922 31898 3.0GB/s html +0.1%
- BM_UValidate/1 341265 363554 1.8GB/s urls -6.1%
- BM_UValidate/2 160 151 782.8GB/s jpg +6.0%
- BM_UValidate/3 10402 10380 8.5GB/s pdf +0.2%
- BM_UValidate/4 129490 130587 2.9GB/s html4 -0.8%
- BM_UDataBuffer/0 59383 58736 1.6GB/s html +1.1%
- BM_UDataBuffer/1 619222 637786 1049.8MB/s urls -2.9%
- BM_UDataBuffer/2 10775 11941 9.9GB/s jpg -9.8%
- BM_UDataBuffer/3 18002 17930 4.9GB/s pdf +0.4%
- BM_UDataBuffer/4 259182 259306 1.5GB/s html4 -0.0%
- BM_UCord/0 59379 57814 1.6GB/s html +2.7%
- BM_UCord/1 598456 615162 1088.4MB/s urls -2.7%
- BM_UCord/2 8519 8628 13.7GB/s jpg -1.3%
- BM_UCord/3 18123 17537 5.0GB/s pdf +3.3%
- BM_UCord/4 252375 252331 1.5GB/s html4 +0.0%
- BM_UCordString/0 49494 49790 1.9GB/s html -0.6%
- BM_UCordString/1 524659 541803 1.2GB/s urls -3.2%
- BM_UCordString/2 8206 8354 14.2GB/s jpg -1.8%
- BM_UCordString/3 17235 16537 5.3GB/s pdf +4.2%
- BM_UCordString/4 210188 211072 1.8GB/s html4 -0.4%
- BM_UCordValidate/0 31956 31587 3.0GB/s html +1.2%
- BM_UCordValidate/1 340828 362141 1.8GB/s urls -5.9%
- BM_UCordValidate/2 783 744 158.9GB/s jpg +5.2%
- BM_UCordValidate/3 10543 10462 8.4GB/s pdf +0.8%
- BM_UCordValidate/4 130150 129789 2.9GB/s html4 +0.3%
- BM_ZFlat/0 113873 111200 878.2MB/s html (22.31 %) +2.4%
- BM_ZFlat/1 1473023 1489858 449.4MB/s urls (47.77 %) -1.1%
- BM_ZFlat/2 23569 19486 6.1GB/s jpg (99.87 %) +21.0%
- BM_ZFlat/3 49178 48046 1.8GB/s pdf (82.07 %) +2.4%
- BM_ZFlat/4 475063 469394 832.2MB/s html4 (22.51 %) +1.2%
- BM_ZFlat/5 46910 46816 501.2MB/s cp (48.12 %) +0.2%
- BM_ZFlat/6 16883 16916 628.6MB/s c (42.40 %) -0.2%
- BM_ZFlat/7 5381 5447 651.5MB/s lsp (48.37 %) -1.2%
- BM_ZFlat/8 1466870 1473861 666.3MB/s xls (41.23 %) -0.5%
- BM_ZFlat/9 468006 464101 312.5MB/s txt1 (57.87 %) +0.8%
- BM_ZFlat/10 408157 408957 291.9MB/s txt2 (61.93 %) -0.2%
- BM_ZFlat/11 1253348 1232910 330.1MB/s txt3 (54.92 %) +1.7%
- BM_ZFlat/12 1702373 1702977 269.8MB/s txt4 (66.22 %) -0.0%
- BM_ZFlat/13 439792 438557 1116.0MB/s bin (18.11 %) +0.3%
- BM_ZFlat/14 80766 78851 462.5MB/s sum (48.96 %) +2.4%
- BM_ZFlat/15 7420 7542 534.5MB/s man (59.36 %) -1.6%
- BM_ZFlat/16 112043 100126 1.1GB/s pb (19.64 %) +11.9%
- BM_ZFlat/17 368877 357703 491.4MB/s gaviota (37.72 %) +3.1%
- BM_ZCord/0 116402 113564 859.9MB/s html +2.5%
- BM_ZCord/1 1507156 1519911 440.5MB/s urls -0.8%
- BM_ZCord/2 39860 33686 3.5GB/s jpg +18.3%
- BM_ZCord/3 56211 54694 1.6GB/s pdf +2.8%
- BM_ZCord/4 485594 479212 815.1MB/s html4 +1.3%
- BM_ZDataBuffer/0 123185 121572 803.3MB/s html +1.3%
- BM_ZDataBuffer/1 1569111 1589380 421.3MB/s urls -1.3%
- BM_ZDataBuffer/2 53143 49556 2.4GB/s jpg +7.2%
- BM_ZDataBuffer/3 65725 66826 1.3GB/s pdf -1.6%
- BM_ZDataBuffer/4 517871 514750 758.9MB/s html4 +0.6%
- Sum of all benchmarks 20258879 20315484 -0.3%
-
-
-AMD Instanbul 2.4 GHz:
-
- Benchmark Base (ns) New (ns) Improvement
- -------------------------------------------------------------------------------------------------
- BM_UFlat/0 97120 96585 1011.1MB/s html +0.6%
- BM_UFlat/1 917473 948016 706.3MB/s urls -3.2%
- BM_UFlat/2 21496 23938 4.9GB/s jpg -10.2%
- BM_UFlat/3 44751 45639 1.9GB/s pdf -1.9%
- BM_UFlat/4 391950 391413 998.0MB/s html4 +0.1%
- BM_UFlat/5 37366 37201 630.7MB/s cp +0.4%
- BM_UFlat/6 18350 18318 580.5MB/s c +0.2%
- BM_UFlat/7 5672 5661 626.9MB/s lsp +0.2%
- BM_UFlat/8 1533390 1529441 642.1MB/s xls +0.3%
- BM_UFlat/9 335477 336553 431.0MB/s txt1 -0.3%
- BM_UFlat/10 285140 292080 408.7MB/s txt2 -2.4%
- BM_UFlat/11 888507 894758 454.9MB/s txt3 -0.7%
- BM_UFlat/12 1187643 1210928 379.5MB/s txt4 -1.9%
- BM_UFlat/13 493717 507447 964.5MB/s bin -2.7%
- BM_UFlat/14 61740 60870 599.1MB/s sum +1.4%
- BM_UFlat/15 7211 7187 560.9MB/s man +0.3%
- BM_UFlat/16 97435 93100 1.2GB/s pb +4.7%
- BM_UFlat/17 362662 356395 493.2MB/s gaviota +1.8%
- BM_UValidate/0 47475 47118 2.0GB/s html +0.8%
- BM_UValidate/1 501304 529741 1.2GB/s urls -5.4%
- BM_UValidate/2 276 243 486.2GB/s jpg +13.6%
- BM_UValidate/3 16361 16261 5.4GB/s pdf +0.6%
- BM_UValidate/4 190741 190353 2.0GB/s html4 +0.2%
- BM_UDataBuffer/0 111080 109771 889.6MB/s html +1.2%
- BM_UDataBuffer/1 1051035 1085999 616.5MB/s urls -3.2%
- BM_UDataBuffer/2 25801 25463 4.6GB/s jpg +1.3%
- BM_UDataBuffer/3 50493 49946 1.8GB/s pdf +1.1%
- BM_UDataBuffer/4 447258 444138 879.5MB/s html4 +0.7%
- BM_UCord/0 109350 107909 905.0MB/s html +1.3%
- BM_UCord/1 1023396 1054964 634.7MB/s urls -3.0%
- BM_UCord/2 25292 24371 4.9GB/s jpg +3.8%
- BM_UCord/3 48955 49736 1.8GB/s pdf -1.6%
- BM_UCord/4 440452 437331 893.2MB/s html4 +0.7%
- BM_UCordString/0 98511 98031 996.2MB/s html +0.5%
- BM_UCordString/1 933230 963495 694.9MB/s urls -3.1%
- BM_UCordString/2 23311 24076 4.9GB/s jpg -3.2%
- BM_UCordString/3 45568 46196 1.9GB/s pdf -1.4%
- BM_UCordString/4 397791 396934 984.1MB/s html4 +0.2%
- BM_UCordValidate/0 47537 46921 2.0GB/s html +1.3%
- BM_UCordValidate/1 505071 532716 1.2GB/s urls -5.2%
- BM_UCordValidate/2 1663 1621 72.9GB/s jpg +2.6%
- BM_UCordValidate/3 16890 16926 5.2GB/s pdf -0.2%
- BM_UCordValidate/4 192365 191984 2.0GB/s html4 +0.2%
- BM_ZFlat/0 184708 179103 545.3MB/s html (22.31 %) +3.1%
- BM_ZFlat/1 2293864 2302950 290.7MB/s urls (47.77 %) -0.4%
- BM_ZFlat/2 52852 47618 2.5GB/s jpg (99.87 %) +11.0%
- BM_ZFlat/3 100766 96179 935.3MB/s pdf (82.07 %) +4.8%
- BM_ZFlat/4 741220 727977 536.6MB/s html4 (22.51 %) +1.8%
- BM_ZFlat/5 85402 85418 274.7MB/s cp (48.12 %) -0.0%
- BM_ZFlat/6 36558 36494 291.4MB/s c (42.40 %) +0.2%
- BM_ZFlat/7 12706 12507 283.7MB/s lsp (48.37 %) +1.6%
- BM_ZFlat/8 2336823 2335688 420.5MB/s xls (41.23 %) +0.0%
- BM_ZFlat/9 701804 681153 212.9MB/s txt1 (57.87 %) +3.0%
- BM_ZFlat/10 606700 597194 199.9MB/s txt2 (61.93 %) +1.6%
- BM_ZFlat/11 1852283 1803238 225.7MB/s txt3 (54.92 %) +2.7%
- BM_ZFlat/12 2475527 2443354 188.1MB/s txt4 (66.22 %) +1.3%
- BM_ZFlat/13 694497 696654 702.6MB/s bin (18.11 %) -0.3%
- BM_ZFlat/14 136929 129855 280.8MB/s sum (48.96 %) +5.4%
- BM_ZFlat/15 17172 17124 235.4MB/s man (59.36 %) +0.3%
- BM_ZFlat/16 190364 171763 658.4MB/s pb (19.64 %) +10.8%
- BM_ZFlat/17 567285 555190 316.6MB/s gaviota (37.72 %) +2.2%
- BM_ZCord/0 193490 187031 522.1MB/s html +3.5%
- BM_ZCord/1 2427537 2415315 277.2MB/s urls +0.5%
- BM_ZCord/2 85378 81412 1.5GB/s jpg +4.9%
- BM_ZCord/3 121898 119419 753.3MB/s pdf +2.1%
- BM_ZCord/4 779564 762961 512.0MB/s html4 +2.2%
- BM_ZDataBuffer/0 213820 207272 471.1MB/s html +3.2%
- BM_ZDataBuffer/1 2589010 2586495 258.9MB/s urls +0.1%
- BM_ZDataBuffer/2 121871 118885 1018.4MB/s jpg +2.5%
- BM_ZDataBuffer/3 145382 145986 616.2MB/s pdf -0.4%
- BM_ZDataBuffer/4 868117 852754 458.1MB/s html4 +1.8%
- Sum of all benchmarks 33771833 33744763 +0.1%
-
-------------------------------------------------------------------------
-r70 | snappy.mirrorbot@gmail.com | 2013-01-06 20:21:26 +0100 (Sun, 06 Jan 2013) | 6 lines
-
-Adjust the Snappy open-source distribution for the changes in Google's
-internal file API.
-
-R=sanjay
-
-
-------------------------------------------------------------------------
-r69 | snappy.mirrorbot@gmail.com | 2013-01-04 12:54:20 +0100 (Fri, 04 Jan 2013) | 15 lines
-
-Change a few ORs to additions where they don't matter. This helps the compiler
-use the LEA instruction more efficiently, since e.g. a + (b << 2) can be encoded
-as one instruction. Even more importantly, it can constant-fold the
-COPY_* enums together with the shifted negative constants, which also saves
-some instructions. (We don't need it for LITERAL, since it happens to be 0.)
-
-I am unsure why the compiler couldn't do this itself, but the theory is that
-it cannot prove that len-1 and len-4 cannot underflow/wrap, and thus can't
-do the optimization safely.
-
-The gains are small but measurable; 0.5-1.0% over the BM_Z* benchmarks
-(measured on Westmere, Sandy Bridge and Istanbul).
-
-R=sanjay
-
-------------------------------------------------------------------------
-r68 | snappy.mirrorbot@gmail.com | 2012-10-08 13:37:16 +0200 (Mon, 08 Oct 2012) | 5 lines
-
-Stop giving -Werror to automake, due to an incompatibility between current
-versions of libtool and automake on non-GNU platforms (e.g. Mac OS X).
-
-R=sanjay
-
-------------------------------------------------------------------------
-r67 | snappy.mirrorbot@gmail.com | 2012-08-17 15:54:47 +0200 (Fri, 17 Aug 2012) | 5 lines
-
-Fix public issue 66: Document GetUncompressedLength better, in particular that
-it leaves the source in a state that's not appropriate for RawUncompress.
-
-R=sanjay
-
-------------------------------------------------------------------------
-r66 | snappy.mirrorbot@gmail.com | 2012-07-31 13:44:44 +0200 (Tue, 31 Jul 2012) | 5 lines
-
-Fix public issue 64: Check for <sys/time.h> at configure time,
-since MSVC seemingly does not have it.
-
-R=sanjay
-
-------------------------------------------------------------------------
-r65 | snappy.mirrorbot@gmail.com | 2012-07-04 11:34:48 +0200 (Wed, 04 Jul 2012) | 10 lines
-
-Handle the case where gettimeofday() goes backwards or returns the same value
-twice; it could cause division by zero in the unit test framework.
-(We already had one fix for this in place, but it was incomplete.)
-
-This could in theory happen on any system, since there are few guarantees
-about gettimeofday(), but seems to only happen in practice on GNU/Hurd, where
-gettimeofday() is cached and only updated ever so often.
-
-R=sanjay
-
-------------------------------------------------------------------------
-r64 | snappy.mirrorbot@gmail.com | 2012-07-04 11:28:33 +0200 (Wed, 04 Jul 2012) | 6 lines
-
-Mark ARMv4 as not supporting unaligned accesses (not just ARMv5 and ARMv6);
-apparently Debian still targets these by default, giving us segfaults on
-armel.
-
-R=sanjay
-
-------------------------------------------------------------------------
-r63 | snappy.mirrorbot@gmail.com | 2012-05-22 11:46:05 +0200 (Tue, 22 May 2012) | 5 lines
-
-Fix public bug #62: Remove an extraneous comma at the end of an enum list,
-causing compile errors when embedded in Mozilla on OpenBSD.
-
-R=sanjay
-
-------------------------------------------------------------------------
-r62 | snappy.mirrorbot@gmail.com | 2012-05-22 11:32:50 +0200 (Tue, 22 May 2012) | 8 lines
-
-Snappy library no longer depends on iostream.
-
-Achieved by moving logging macro definitions to a test-only
-header file, and by changing non-test code to use assert,
-fprintf, and abort instead of LOG/CHECK macros.
-
-R=sesse
-
-------------------------------------------------------------------------
-r61 | snappy.mirrorbot@gmail.com | 2012-02-24 16:46:37 +0100 (Fri, 24 Feb 2012) | 4 lines
-
-Release Snappy 1.0.5.
-
-R=sanjay
-
-------------------------------------------------------------------------
-r60 | snappy.mirrorbot@gmail.com | 2012-02-23 18:00:36 +0100 (Thu, 23 Feb 2012) | 57 lines
-
-For 32-bit platforms, do not try to accelerate multiple neighboring
-32-bit loads with a 64-bit load during compression (it's not a win).
-
-The main target for this optimization is ARM, but 32-bit x86 gets
-a small gain, too, although there is noise in the microbenchmarks.
-It's a no-op for 64-bit x86. It does not affect decompression.
-
-Microbenchmark results on a Cortex-A9 1GHz, using g++ 4.6.2 (from
-Ubuntu/Linaro), -O2 -DNDEBUG -Wa,-march=armv7a -mtune=cortex-a9
--mthumb-interwork, minimum 1000 iterations:
-
- Benchmark Time(ns) CPU(ns) Iterations
- ---------------------------------------------------
- BM_ZFlat/0 1158277 1160000 1000 84.2MB/s html (23.57 %) [ +4.3%]
- BM_ZFlat/1 14861782 14860000 1000 45.1MB/s urls (50.89 %) [ +1.1%]
- BM_ZFlat/2 393595 390000 1000 310.5MB/s jpg (99.88 %) [ +0.0%]
- BM_ZFlat/3 650583 650000 1000 138.4MB/s pdf (82.13 %) [ +3.1%]
- BM_ZFlat/4 4661480 4660000 1000 83.8MB/s html4 (23.55 %) [ +4.3%]
- BM_ZFlat/5 491973 490000 1000 47.9MB/s cp (48.12 %) [ +2.0%]
- BM_ZFlat/6 193575 192678 1038 55.2MB/s c (42.40 %) [ +9.0%]
- BM_ZFlat/7 62343 62754 3187 56.5MB/s lsp (48.37 %) [ +2.6%]
- BM_ZFlat/8 17708468 17710000 1000 55.5MB/s xls (41.34 %) [ -0.3%]
- BM_ZFlat/9 3755345 3760000 1000 38.6MB/s txt1 (59.81 %) [ +8.2%]
- BM_ZFlat/10 3324217 3320000 1000 36.0MB/s txt2 (64.07 %) [ +4.2%]
- BM_ZFlat/11 10139932 10140000 1000 40.1MB/s txt3 (57.11 %) [ +6.4%]
- BM_ZFlat/12 13532109 13530000 1000 34.0MB/s txt4 (68.35 %) [ +5.0%]
- BM_ZFlat/13 4690847 4690000 1000 104.4MB/s bin (18.21 %) [ +4.1%]
- BM_ZFlat/14 830682 830000 1000 43.9MB/s sum (51.88 %) [ +1.2%]
- BM_ZFlat/15 84784 85011 2235 47.4MB/s man (59.36 %) [ +1.1%]
- BM_ZFlat/16 1293254 1290000 1000 87.7MB/s pb (23.15 %) [ +2.3%]
- BM_ZFlat/17 2775155 2780000 1000 63.2MB/s gaviota (38.27 %) [+12.2%]
-
-Core i7 in 32-bit mode (only one run and 100 iterations, though, so noisy):
-
- Benchmark Time(ns) CPU(ns) Iterations
- ---------------------------------------------------
- BM_ZFlat/0 227582 223464 3043 437.0MB/s html (23.57 %) [ +7.4%]
- BM_ZFlat/1 2982430 2918455 233 229.4MB/s urls (50.89 %) [ +2.9%]
- BM_ZFlat/2 46967 46658 15217 2.5GB/s jpg (99.88 %) [ +0.0%]
- BM_ZFlat/3 115298 114864 5833 783.2MB/s pdf (82.13 %) [ +1.5%]
- BM_ZFlat/4 913440 899743 778 434.2MB/s html4 (23.55 %) [ +0.3%]
- BM_ZFlat/5 110302 108571 7000 216.1MB/s cp (48.12 %) [ +0.0%]
- BM_ZFlat/6 44409 43372 15909 245.2MB/s c (42.40 %) [ +0.8%]
- BM_ZFlat/7 15713 15643 46667 226.9MB/s lsp (48.37 %) [ +2.7%]
- BM_ZFlat/8 2625539 2602230 269 377.4MB/s xls (41.34 %) [ +1.4%]
- BM_ZFlat/9 808884 811429 875 178.8MB/s txt1 (59.81 %) [ -3.9%]
- BM_ZFlat/10 709532 700000 1000 170.5MB/s txt2 (64.07 %) [ +0.0%]
- BM_ZFlat/11 2177682 2162162 333 188.2MB/s txt3 (57.11 %) [ -1.4%]
- BM_ZFlat/12 2849640 2840000 250 161.8MB/s txt4 (68.35 %) [ -1.4%]
- BM_ZFlat/13 849760 835476 778 585.8MB/s bin (18.21 %) [ +1.2%]
- BM_ZFlat/14 165940 164571 4375 221.6MB/s sum (51.88 %) [ +1.4%]
- BM_ZFlat/15 20939 20571 35000 196.0MB/s man (59.36 %) [ +2.1%]
- BM_ZFlat/16 239209 236544 2917 478.1MB/s pb (23.15 %) [ +4.2%]
- BM_ZFlat/17 616206 610000 1000 288.2MB/s gaviota (38.27 %) [ -1.6%]
-
-R=sanjay
-
-------------------------------------------------------------------------
-r59 | snappy.mirrorbot@gmail.com | 2012-02-21 18:02:17 +0100 (Tue, 21 Feb 2012) | 107 lines
-
-Enable the use of unaligned loads and stores for ARM-based architectures
-where they are available (ARMv7 and higher). This gives a significant
-speed boost on ARM, both for compression and decompression.
-It should not affect x86 at all.
-
-There are more changes possible to speed up ARM, but it might not be
-that easy to do without hurting x86 or making the code uglier.
-Also, we de not try to use NEON yet.
-
-Microbenchmark results on a Cortex-A9 1GHz, using g++ 4.6.2 (from Ubuntu/Linaro),
--O2 -DNDEBUG -Wa,-march=armv7a -mtune=cortex-a9 -mthumb-interwork:
-
-Benchmark Time(ns) CPU(ns) Iterations
----------------------------------------------------
-BM_UFlat/0 524806 529100 378 184.6MB/s html [+33.6%]
-BM_UFlat/1 5139790 5200000 100 128.8MB/s urls [+28.8%]
-BM_UFlat/2 86540 84166 1901 1.4GB/s jpg [ +0.6%]
-BM_UFlat/3 215351 210176 904 428.0MB/s pdf [+29.8%]
-BM_UFlat/4 2144490 2100000 100 186.0MB/s html4 [+33.3%]
-BM_UFlat/5 194482 190000 1000 123.5MB/s cp [+36.2%]
-BM_UFlat/6 91843 90175 2107 117.9MB/s c [+38.6%]
-BM_UFlat/7 28535 28426 6684 124.8MB/s lsp [+34.7%]
-BM_UFlat/8 9206600 9200000 100 106.7MB/s xls [+42.4%]
-BM_UFlat/9 1865273 1886792 106 76.9MB/s txt1 [+32.5%]
-BM_UFlat/10 1576809 1587301 126 75.2MB/s txt2 [+32.3%]
-BM_UFlat/11 4968450 4900000 100 83.1MB/s txt3 [+32.7%]
-BM_UFlat/12 6673970 6700000 100 68.6MB/s txt4 [+32.8%]
-BM_UFlat/13 2391470 2400000 100 203.9MB/s bin [+29.2%]
-BM_UFlat/14 334601 344827 522 105.8MB/s sum [+30.6%]
-BM_UFlat/15 37404 38080 5252 105.9MB/s man [+33.8%]
-BM_UFlat/16 535470 540540 370 209.2MB/s pb [+31.2%]
-BM_UFlat/17 1875245 1886792 106 93.2MB/s gaviota [+37.8%]
-BM_UValidate/0 178425 179533 1114 543.9MB/s html [ +2.7%]
-BM_UValidate/1 2100450 2000000 100 334.8MB/s urls [ +5.0%]
-BM_UValidate/2 1039 1044 172413 113.3GB/s jpg [ +3.4%]
-BM_UValidate/3 59423 59470 3363 1.5GB/s pdf [ +7.8%]
-BM_UValidate/4 760716 766283 261 509.8MB/s html4 [ +6.5%]
-BM_ZFlat/0 1204632 1204819 166 81.1MB/s html (23.57 %) [+32.8%]
-BM_ZFlat/1 15656190 15600000 100 42.9MB/s urls (50.89 %) [+27.6%]
-BM_ZFlat/2 403336 410677 487 294.8MB/s jpg (99.88 %) [+16.5%]
-BM_ZFlat/3 664073 671140 298 134.0MB/s pdf (82.13 %) [+28.4%]
-BM_ZFlat/4 4961940 4900000 100 79.7MB/s html4 (23.55 %) [+30.6%]
-BM_ZFlat/5 500664 501253 399 46.8MB/s cp (48.12 %) [+33.4%]
-BM_ZFlat/6 217276 215982 926 49.2MB/s c (42.40 %) [+25.0%]
-BM_ZFlat/7 64122 65487 3054 54.2MB/s lsp (48.37 %) [+36.1%]
-BM_ZFlat/8 18045730 18000000 100 54.6MB/s xls (41.34 %) [+34.4%]
-BM_ZFlat/9 4051530 4000000 100 36.3MB/s txt1 (59.81 %) [+25.0%]
-BM_ZFlat/10 3451800 3500000 100 34.1MB/s txt2 (64.07 %) [+25.7%]
-BM_ZFlat/11 11052340 11100000 100 36.7MB/s txt3 (57.11 %) [+24.3%]
-BM_ZFlat/12 14538690 14600000 100 31.5MB/s txt4 (68.35 %) [+24.7%]
-BM_ZFlat/13 5041850 5000000 100 97.9MB/s bin (18.21 %) [+32.0%]
-BM_ZFlat/14 908840 909090 220 40.1MB/s sum (51.88 %) [+22.2%]
-BM_ZFlat/15 86921 86206 1972 46.8MB/s man (59.36 %) [+42.2%]
-BM_ZFlat/16 1312315 1315789 152 86.0MB/s pb (23.15 %) [+34.5%]
-BM_ZFlat/17 3173120 3200000 100 54.9MB/s gaviota (38.27%) [+28.1%]
-
-
-The move from 64-bit to 32-bit operations for the copies also affected 32-bit x86;
-positive on the decompression side, and slightly negative on the compression side
-(unless that is noise; I only ran once):
-
-Benchmark Time(ns) CPU(ns) Iterations
------------------------------------------------------
-BM_UFlat/0 86279 86140 7778 1.1GB/s html [ +7.5%]
-BM_UFlat/1 839265 822622 778 813.9MB/s urls [ +9.4%]
-BM_UFlat/2 9180 9143 87500 12.9GB/s jpg [ +1.2%]
-BM_UFlat/3 35080 35000 20000 2.5GB/s pdf [+10.1%]
-BM_UFlat/4 350318 345000 2000 1.1GB/s html4 [ +7.0%]
-BM_UFlat/5 33808 33472 21212 701.0MB/s cp [ +9.0%]
-BM_UFlat/6 15201 15214 46667 698.9MB/s c [+14.9%]
-BM_UFlat/7 4652 4651 159091 762.9MB/s lsp [ +7.5%]
-BM_UFlat/8 1285551 1282528 538 765.7MB/s xls [+10.7%]
-BM_UFlat/9 282510 281690 2414 514.9MB/s txt1 [+13.6%]
-BM_UFlat/10 243494 239286 2800 498.9MB/s txt2 [+14.4%]
-BM_UFlat/11 743625 740000 1000 550.0MB/s txt3 [+14.3%]
-BM_UFlat/12 999441 989717 778 464.3MB/s txt4 [+16.1%]
-BM_UFlat/13 412402 410076 1707 1.2GB/s bin [ +7.3%]
-BM_UFlat/14 54876 54000 10000 675.3MB/s sum [+13.0%]
-BM_UFlat/15 6146 6100 100000 660.8MB/s man [+14.8%]
-BM_UFlat/16 90496 90286 8750 1.2GB/s pb [ +4.0%]
-BM_UFlat/17 292650 292000 2500 602.0MB/s gaviota [+18.1%]
-BM_UValidate/0 49620 49699 14286 1.9GB/s html [ +0.0%]
-BM_UValidate/1 501371 500000 1000 1.3GB/s urls [ +0.0%]
-BM_UValidate/2 232 227 3043478 521.5GB/s jpg [ +1.3%]
-BM_UValidate/3 17250 17143 43750 5.1GB/s pdf [ -1.3%]
-BM_UValidate/4 198643 200000 3500 1.9GB/s html4 [ -0.9%]
-BM_ZFlat/0 227128 229415 3182 425.7MB/s html (23.57 %) [ -1.4%]
-BM_ZFlat/1 2970089 2960000 250 226.2MB/s urls (50.89 %) [ -1.9%]
-BM_ZFlat/2 45683 44999 15556 2.6GB/s jpg (99.88 %) [ +2.2%]
-BM_ZFlat/3 114661 113136 6364 795.1MB/s pdf (82.13 %) [ -1.5%]
-BM_ZFlat/4 919702 914286 875 427.2MB/s html4 (23.55%) [ -1.3%]
-BM_ZFlat/5 108189 108422 6364 216.4MB/s cp (48.12 %) [ -1.2%]
-BM_ZFlat/6 44525 44000 15909 241.7MB/s c (42.40 %) [ -2.9%]
-BM_ZFlat/7 15973 15857 46667 223.8MB/s lsp (48.37 %) [ +0.0%]
-BM_ZFlat/8 2677888 2639405 269 372.1MB/s xls (41.34 %) [ -1.4%]
-BM_ZFlat/9 800715 780000 1000 186.0MB/s txt1 (59.81 %) [ -0.4%]
-BM_ZFlat/10 700089 700000 1000 170.5MB/s txt2 (64.07 %) [ -2.9%]
-BM_ZFlat/11 2159356 2138365 318 190.3MB/s txt3 (57.11 %) [ -0.3%]
-BM_ZFlat/12 2796143 2779923 259 165.3MB/s txt4 (68.35 %) [ -1.4%]
-BM_ZFlat/13 856458 835476 778 585.8MB/s bin (18.21 %) [ -0.1%]
-BM_ZFlat/14 166908 166857 4375 218.6MB/s sum (51.88 %) [ -1.4%]
-BM_ZFlat/15 21181 20857 35000 193.3MB/s man (59.36 %) [ -0.8%]
-BM_ZFlat/16 244009 239973 2917 471.3MB/s pb (23.15 %) [ -1.4%]
-BM_ZFlat/17 596362 590000 1000 297.9MB/s gaviota (38.27%) [ +0.0%]
-
-R=sanjay
-
-------------------------------------------------------------------------
-r58 | snappy.mirrorbot@gmail.com | 2012-02-11 23:11:22 +0100 (Sat, 11 Feb 2012) | 9 lines
-
-Lower the size allocated in the "corrupted input" unit test from 256 MB
-to 2 MB. This fixes issues with running the unit test on platforms with
-little RAM (e.g. some ARM boards).
-
-Also, reactivate the 2 MB test for 64-bit platforms; there's no good
-reason why it shouldn't be.
-
-R=sanjay
-
-------------------------------------------------------------------------
-r57 | snappy.mirrorbot@gmail.com | 2012-01-08 18:55:48 +0100 (Sun, 08 Jan 2012) | 2 lines
-
-Minor refactoring to accomodate changes in Google's internal code tree.
-
-------------------------------------------------------------------------
-r56 | snappy.mirrorbot@gmail.com | 2012-01-04 14:10:46 +0100 (Wed, 04 Jan 2012) | 19 lines
-
-Fix public issue r57: Fix most warnings with -Wall, mostly signed/unsigned
-warnings. There are still some in the unit test, but the main .cc file should
-be clean. We haven't enabled -Wall for the default build, since the unit test
-is still not clean.
-
-This also fixes a real bug in the open-source implementation of
-ReadFileToStringOrDie(); it would not detect errors correctly.
-
-I had to go through some pains to avoid performance loss as the types
-were changed; I think there might still be some with 32-bit if and only if LFS
-is enabled (ie., size_t is 64-bit), but for regular 32-bit and 64-bit I can't
-see any losses, and I've diffed the generated GCC assembler between the old and
-new code without seeing any significant choices. If anything, it's ever so
-slightly faster.
-
-This may or may not enable compression of very large blocks (>2^32 bytes)
-when size_t is 64-bit, but I haven't checked, and it is still not a supported
-case.
-
-------------------------------------------------------------------------
-r55 | snappy.mirrorbot@gmail.com | 2012-01-04 11:46:39 +0100 (Wed, 04 Jan 2012) | 6 lines
-
-Add a framing format description. We do not have any implementation of this at
-the current point, but there seems to be enough of a general interest in the
-topic (cf. public bug #34).
-
-R=csilvers,sanjay
-
-------------------------------------------------------------------------
-r54 | snappy.mirrorbot@gmail.com | 2011-12-05 22:27:26 +0100 (Mon, 05 Dec 2011) | 81 lines
-
-Speed up decompression by moving the refill check to the end of the loop.
-
-This seems to work because in most of the branches, the compiler can evaluate
-“ip_limit_ - ip” in a more efficient way than reloading ip_limit_ from memory
-(either by already having the entire expression in a register, or reconstructing
-it from “avail”, or something else). Memory loads, even from L1, are seemingly
-costly in the big picture at the current decompression speeds.
-
-Microbenchmarks (64-bit, opt mode):
-
-Westmere (Intel Core i7):
-
- Benchmark Time(ns) CPU(ns) Iterations
- --------------------------------------------
- BM_UFlat/0 74492 74491 187894 1.3GB/s html [ +5.9%]
- BM_UFlat/1 712268 712263 19644 940.0MB/s urls [ +3.8%]
- BM_UFlat/2 10591 10590 1000000 11.2GB/s jpg [ -6.8%]
- BM_UFlat/3 29643 29643 469915 3.0GB/s pdf [ +7.9%]
- BM_UFlat/4 304669 304667 45930 1.3GB/s html4 [ +4.8%]
- BM_UFlat/5 28508 28507 490077 823.1MB/s cp [ +4.0%]
- BM_UFlat/6 12415 12415 1000000 856.5MB/s c [ +8.6%]
- BM_UFlat/7 3415 3415 4084723 1039.0MB/s lsp [+18.0%]
- BM_UFlat/8 979569 979563 14261 1002.5MB/s xls [ +5.8%]
- BM_UFlat/9 230150 230148 60934 630.2MB/s txt1 [ +5.2%]
- BM_UFlat/10 197167 197166 71135 605.5MB/s txt2 [ +4.7%]
- BM_UFlat/11 607394 607390 23041 670.1MB/s txt3 [ +5.6%]
- BM_UFlat/12 808502 808496 17316 568.4MB/s txt4 [ +5.0%]
- BM_UFlat/13 372791 372788 37564 1.3GB/s bin [ +3.3%]
- BM_UFlat/14 44541 44541 313969 818.8MB/s sum [ +5.7%]
- BM_UFlat/15 4833 4833 2898697 834.1MB/s man [ +4.8%]
- BM_UFlat/16 79855 79855 175356 1.4GB/s pb [ +4.8%]
- BM_UFlat/17 245845 245843 56838 715.0MB/s gaviota [ +5.8%]
-
-Clovertown (Intel Core 2):
-
- Benchmark Time(ns) CPU(ns) Iterations
- --------------------------------------------
- BM_UFlat/0 107911 107890 100000 905.1MB/s html [ +2.2%]
- BM_UFlat/1 1011237 1011041 10000 662.3MB/s urls [ +2.5%]
- BM_UFlat/2 26775 26770 523089 4.4GB/s jpg [ +0.0%]
- BM_UFlat/3 48103 48095 290618 1.8GB/s pdf [ +3.4%]
- BM_UFlat/4 437724 437644 31937 892.6MB/s html4 [ +2.1%]
- BM_UFlat/5 39607 39600 358284 592.5MB/s cp [ +2.4%]
- BM_UFlat/6 18227 18224 768191 583.5MB/s c [ +2.7%]
- BM_UFlat/7 5171 5170 2709437 686.4MB/s lsp [ +3.9%]
- BM_UFlat/8 1560291 1559989 8970 629.5MB/s xls [ +3.6%]
- BM_UFlat/9 335401 335343 41731 432.5MB/s txt1 [ +3.0%]
- BM_UFlat/10 287014 286963 48758 416.0MB/s txt2 [ +2.8%]
- BM_UFlat/11 888522 888356 15752 458.1MB/s txt3 [ +2.9%]
- BM_UFlat/12 1186600 1186378 10000 387.3MB/s txt4 [ +3.1%]
- BM_UFlat/13 572295 572188 24468 855.4MB/s bin [ +2.1%]
- BM_UFlat/14 64060 64049 218401 569.4MB/s sum [ +4.1%]
- BM_UFlat/15 7264 7263 1916168 555.0MB/s man [ +1.4%]
- BM_UFlat/16 108853 108836 100000 1039.1MB/s pb [ +1.7%]
- BM_UFlat/17 364289 364223 38419 482.6MB/s gaviota [ +4.9%]
-
-Barcelona (AMD Opteron):
-
- Benchmark Time(ns) CPU(ns) Iterations
- --------------------------------------------
- BM_UFlat/0 103900 103871 100000 940.2MB/s html [ +8.3%]
- BM_UFlat/1 1000435 1000107 10000 669.5MB/s urls [ +6.6%]
- BM_UFlat/2 24659 24652 567362 4.8GB/s jpg [ +0.1%]
- BM_UFlat/3 48206 48193 291121 1.8GB/s pdf [ +5.0%]
- BM_UFlat/4 421980 421850 33174 926.0MB/s html4 [ +7.3%]
- BM_UFlat/5 40368 40357 346994 581.4MB/s cp [ +8.7%]
- BM_UFlat/6 19836 19830 708695 536.2MB/s c [ +8.0%]
- BM_UFlat/7 6100 6098 2292774 581.9MB/s lsp [ +9.0%]
- BM_UFlat/8 1693093 1692514 8261 580.2MB/s xls [ +8.0%]
- BM_UFlat/9 365991 365886 38225 396.4MB/s txt1 [ +7.1%]
- BM_UFlat/10 311330 311238 44950 383.6MB/s txt2 [ +7.6%]
- BM_UFlat/11 975037 974737 14376 417.5MB/s txt3 [ +6.9%]
- BM_UFlat/12 1303558 1303175 10000 352.6MB/s txt4 [ +7.3%]
- BM_UFlat/13 517448 517290 27144 946.2MB/s bin [ +5.5%]
- BM_UFlat/14 66537 66518 210352 548.3MB/s sum [ +7.5%]
- BM_UFlat/15 7976 7974 1760383 505.6MB/s man [ +5.6%]
- BM_UFlat/16 103121 103092 100000 1097.0MB/s pb [ +8.7%]
- BM_UFlat/17 391431 391314 35733 449.2MB/s gaviota [ +6.5%]
-
-R=sanjay
-
-------------------------------------------------------------------------
-r53 | snappy.mirrorbot@gmail.com | 2011-11-23 12:14:17 +0100 (Wed, 23 Nov 2011) | 88 lines
-
-Speed up decompression by making the fast path for literals faster.
-
-We do the fast-path step as soon as possible; in fact, as soon as we know the
-literal length. Since we usually hit the fast path, we can then skip the checks
-for long literals and available input space (beyond what the fast path check
-already does).
-
-Note that this changes the decompression Writer API; however, it does not
-change the ABI, since writers are always templatized and as such never
-cross compilation units. The new API is slightly more general, in that it
-doesn't hard-code the value 16. Note that we also take care to check
-for len <= 16 first, since the other two checks almost always succeed
-(so we don't want to waste time checking for them until we have to).
-
-The improvements are most marked on Nehalem, but are generally positive
-on other platforms as well. All microbenchmarks are 64-bit, opt.
-
-Clovertown (Core 2):
-
- Benchmark Time(ns) CPU(ns) Iterations
- --------------------------------------------
- BM_UFlat/0 110226 110224 100000 886.0MB/s html [ +1.5%]
- BM_UFlat/1 1036523 1036508 10000 646.0MB/s urls [ -0.8%]
- BM_UFlat/2 26775 26775 522570 4.4GB/s jpg [ +0.0%]
- BM_UFlat/3 49738 49737 280974 1.8GB/s pdf [ +0.3%]
- BM_UFlat/4 446790 446792 31334 874.3MB/s html4 [ +0.8%]
- BM_UFlat/5 40561 40562 350424 578.5MB/s cp [ +1.3%]
- BM_UFlat/6 18722 18722 746903 568.0MB/s c [ +1.4%]
- BM_UFlat/7 5373 5373 2608632 660.5MB/s lsp [ +8.3%]
- BM_UFlat/8 1615716 1615718 8670 607.8MB/s xls [ +2.0%]
- BM_UFlat/9 345278 345281 40481 420.1MB/s txt1 [ +1.4%]
- BM_UFlat/10 294855 294855 47452 404.9MB/s txt2 [ +1.6%]
- BM_UFlat/11 914263 914263 15316 445.2MB/s txt3 [ +1.1%]
- BM_UFlat/12 1222694 1222691 10000 375.8MB/s txt4 [ +1.4%]
- BM_UFlat/13 584495 584489 23954 837.4MB/s bin [ -0.6%]
- BM_UFlat/14 66662 66662 210123 547.1MB/s sum [ +1.2%]
- BM_UFlat/15 7368 7368 1881856 547.1MB/s man [ +4.0%]
- BM_UFlat/16 110727 110726 100000 1021.4MB/s pb [ +2.3%]
- BM_UFlat/17 382138 382141 36616 460.0MB/s gaviota [ -0.7%]
-
-Westmere (Core i7):
-
- Benchmark Time(ns) CPU(ns) Iterations
- --------------------------------------------
- BM_UFlat/0 78861 78853 177703 1.2GB/s html [ +2.1%]
- BM_UFlat/1 739560 739491 18912 905.4MB/s urls [ +3.4%]
- BM_UFlat/2 9867 9866 1419014 12.0GB/s jpg [ +3.4%]
- BM_UFlat/3 31989 31986 438385 2.7GB/s pdf [ +0.2%]
- BM_UFlat/4 319406 319380 43771 1.2GB/s html4 [ +1.9%]
- BM_UFlat/5 29639 29636 472862 791.7MB/s cp [ +5.2%]
- BM_UFlat/6 13478 13477 1000000 789.0MB/s c [ +2.3%]
- BM_UFlat/7 4030 4029 3475364 880.7MB/s lsp [ +8.7%]
- BM_UFlat/8 1036585 1036492 10000 947.5MB/s xls [ +6.9%]
- BM_UFlat/9 242127 242105 57838 599.1MB/s txt1 [ +3.0%]
- BM_UFlat/10 206499 206480 67595 578.2MB/s txt2 [ +3.4%]
- BM_UFlat/11 641635 641570 21811 634.4MB/s txt3 [ +2.4%]
- BM_UFlat/12 848847 848769 16443 541.4MB/s txt4 [ +3.1%]
- BM_UFlat/13 384968 384938 36366 1.2GB/s bin [ +0.3%]
- BM_UFlat/14 47106 47101 297770 774.3MB/s sum [ +4.4%]
- BM_UFlat/15 5063 5063 2772202 796.2MB/s man [ +7.7%]
- BM_UFlat/16 83663 83656 167697 1.3GB/s pb [ +1.8%]
- BM_UFlat/17 260224 260198 53823 675.6MB/s gaviota [ -0.5%]
-
-Barcelona (Opteron):
-
- Benchmark Time(ns) CPU(ns) Iterations
- --------------------------------------------
- BM_UFlat/0 112490 112457 100000 868.4MB/s html [ -0.4%]
- BM_UFlat/1 1066719 1066339 10000 627.9MB/s urls [ +1.0%]
- BM_UFlat/2 24679 24672 563802 4.8GB/s jpg [ +0.7%]
- BM_UFlat/3 50603 50589 277285 1.7GB/s pdf [ +2.6%]
- BM_UFlat/4 452982 452849 30900 862.6MB/s html4 [ -0.2%]
- BM_UFlat/5 43860 43848 319554 535.1MB/s cp [ +1.2%]
- BM_UFlat/6 21419 21413 653573 496.6MB/s c [ +1.0%]
- BM_UFlat/7 6646 6645 2105405 534.1MB/s lsp [ +0.3%]
- BM_UFlat/8 1828487 1827886 7658 537.3MB/s xls [ +2.6%]
- BM_UFlat/9 391824 391714 35708 370.3MB/s txt1 [ +2.2%]
- BM_UFlat/10 334913 334816 41885 356.6MB/s txt2 [ +1.7%]
- BM_UFlat/11 1042062 1041674 10000 390.7MB/s txt3 [ +1.1%]
- BM_UFlat/12 1398902 1398456 10000 328.6MB/s txt4 [ +1.7%]
- BM_UFlat/13 545706 545530 25669 897.2MB/s bin [ -0.4%]
- BM_UFlat/14 71512 71505 196035 510.0MB/s sum [ +1.4%]
- BM_UFlat/15 8422 8421 1665036 478.7MB/s man [ +2.6%]
- BM_UFlat/16 112053 112048 100000 1009.3MB/s pb [ -0.4%]
- BM_UFlat/17 416723 416713 33612 421.8MB/s gaviota [ -2.0%]
-
-R=sanjay
-
-------------------------------------------------------------------------
-r52 | snappy.mirrorbot@gmail.com | 2011-11-08 15:46:39 +0100 (Tue, 08 Nov 2011) | 5 lines
-
-Fix public issue #53: Update the README to the API we actually open-sourced
-with.
-
-R=sanjay
-
-------------------------------------------------------------------------
-r51 | snappy.mirrorbot@gmail.com | 2011-10-05 14:27:12 +0200 (Wed, 05 Oct 2011) | 5 lines
-
-In the format description, use a clearer example to emphasize that varints are
-stored in little-endian. Patch from Christian von Roques.
-
-R=csilvers
-
-------------------------------------------------------------------------
-r50 | snappy.mirrorbot@gmail.com | 2011-09-15 21:34:06 +0200 (Thu, 15 Sep 2011) | 4 lines
-
-Release Snappy 1.0.4.
-
-R=sanjay
-
-------------------------------------------------------------------------
-r49 | snappy.mirrorbot@gmail.com | 2011-09-15 11:50:05 +0200 (Thu, 15 Sep 2011) | 5 lines
-
-Fix public issue #50: Include generic byteswap macros.
-Also include Solaris 10 and FreeBSD versions.
-
-R=csilvers
-
-------------------------------------------------------------------------
-r48 | snappy.mirrorbot@gmail.com | 2011-08-10 20:57:27 +0200 (Wed, 10 Aug 2011) | 5 lines
-
-Partially fix public issue 50: Remove an extra comma from the end of some
-enum declarations, as it seems the Sun compiler does not like it.
-
-Based on patch by Travis Vitek.
-
-------------------------------------------------------------------------
-r47 | snappy.mirrorbot@gmail.com | 2011-08-10 20:44:16 +0200 (Wed, 10 Aug 2011) | 4 lines
-
-Use the right #ifdef test for sys/mman.h.
-
-Based on patch by Travis Vitek.
-
-------------------------------------------------------------------------
-r46 | snappy.mirrorbot@gmail.com | 2011-08-10 03:22:09 +0200 (Wed, 10 Aug 2011) | 6 lines
-
-Fix public issue #47: Small comment cleanups in the unit test.
-
-Originally based on a patch by Patrick Pelletier.
-
-R=sanjay
-
-------------------------------------------------------------------------
-r45 | snappy.mirrorbot@gmail.com | 2011-08-10 03:14:43 +0200 (Wed, 10 Aug 2011) | 8 lines
-
-Fix public issue #46: Format description said "3-byte offset"
-instead of "4-byte offset" for the longest copies.
-
-Also fix an inconsistency in the heading for section 2.2.3.
-Both patches by Patrick Pelletier.
-
-R=csilvers
-
-------------------------------------------------------------------------
-r44 | snappy.mirrorbot@gmail.com | 2011-06-28 13:40:25 +0200 (Tue, 28 Jun 2011) | 8 lines
-
-Fix public issue #44: Make the definition and declaration of CompressFragment
-identical, even regarding cv-qualifiers.
-
-This is required to work around a bug in the Solaris Studio C++ compiler
-(it does not properly disregard cv-qualifiers when doing name mangling).
-
-R=sanjay
-
-------------------------------------------------------------------------
-r43 | snappy.mirrorbot@gmail.com | 2011-06-04 12:19:05 +0200 (Sat, 04 Jun 2011) | 7 lines
-
-Correct an inaccuracy in the Snappy format description.
-(I stumbled into this when changing the way we decompress literals.)
-
-R=csilvers
-
-Revision created by MOE tool push_codebase.
-
-------------------------------------------------------------------------
-r42 | snappy.mirrorbot@gmail.com | 2011-06-03 22:53:06 +0200 (Fri, 03 Jun 2011) | 50 lines
-
-Speed up decompression by removing a fast-path attempt.
-
-Whenever we try to enter a copy fast-path, there is a certain cost in checking
-that all the preconditions are in place, but it's normally offset by the fact
-that we can usually take the cheaper path. However, in a certain path we've
-already established that "avail < literal_length", which usually means that
-either the available space is small, or the literal is big. Both will disqualify
-us from taking the fast path, and thus we take the hit from the precondition
-checking without gaining much from having a fast path. Thus, simply don't try
-the fast path in this situation -- we're already on a slow path anyway
-(one where we need to refill more data from the reader).
-
-I'm a bit surprised at how much this gained; it could be that this path is
-more common than I thought, or that the simpler structure somehow makes the
-compiler happier. I haven't looked at the assembler, but it's a win across
-the board on both Core 2, Core i7 and Opteron, at least for the cases we
-typically care about. The gains seem to be the largest on Core i7, though.
-Results from my Core i7 workstation:
-
-
- Benchmark Time(ns) CPU(ns) Iterations
- ---------------------------------------------------
- BM_UFlat/0 73337 73091 190996 1.3GB/s html [ +1.7%]
- BM_UFlat/1 696379 693501 20173 965.5MB/s urls [ +2.7%]
- BM_UFlat/2 9765 9734 1472135 12.1GB/s jpg [ +0.7%]
- BM_UFlat/3 29720 29621 472973 3.0GB/s pdf [ +1.8%]
- BM_UFlat/4 294636 293834 47782 1.3GB/s html4 [ +2.3%]
- BM_UFlat/5 28399 28320 494700 828.5MB/s cp [ +3.5%]
- BM_UFlat/6 12795 12760 1000000 833.3MB/s c [ +1.2%]
- BM_UFlat/7 3984 3973 3526448 893.2MB/s lsp [ +5.7%]
- BM_UFlat/8 991996 989322 14141 992.6MB/s xls [ +3.3%]
- BM_UFlat/9 228620 227835 61404 636.6MB/s txt1 [ +4.0%]
- BM_UFlat/10 197114 196494 72165 607.5MB/s txt2 [ +3.5%]
- BM_UFlat/11 605240 603437 23217 674.4MB/s txt3 [ +3.7%]
- BM_UFlat/12 804157 802016 17456 573.0MB/s txt4 [ +3.9%]
- BM_UFlat/13 347860 346998 40346 1.4GB/s bin [ +1.2%]
- BM_UFlat/14 44684 44559 315315 818.4MB/s sum [ +2.3%]
- BM_UFlat/15 5120 5106 2739726 789.4MB/s man [ +3.3%]
- BM_UFlat/16 76591 76355 183486 1.4GB/s pb [ +2.8%]
- BM_UFlat/17 238564 237828 58824 739.1MB/s gaviota [ +1.6%]
- BM_UValidate/0 42194 42060 333333 2.3GB/s html [ -0.1%]
- BM_UValidate/1 433182 432005 32407 1.5GB/s urls [ -0.1%]
- BM_UValidate/2 197 196 71428571 603.3GB/s jpg [ +0.5%]
- BM_UValidate/3 14494 14462 972222 6.1GB/s pdf [ +0.5%]
- BM_UValidate/4 168444 167836 83832 2.3GB/s html4 [ +0.1%]
-
-R=jeff
-
-Revision created by MOE tool push_codebase.
-
-------------------------------------------------------------------------
-r41 | snappy.mirrorbot@gmail.com | 2011-06-03 22:47:14 +0200 (Fri, 03 Jun 2011) | 43 lines
-
-Speed up decompression by not needing a lookup table for literal items.
-
-Looking up into and decoding the values from char_table has long shown up as a
-hotspot in the decompressor. While it turns out that it's hard to make a more
-efficient decoder for the copy ops, the literals are simple enough that we can
-decode them without needing a table lookup. (This means that 1/4 of the table
-is now unused, although that in itself doesn't buy us anything.)
-
-The gains are small, but definitely present; some tests win as much as 10%,
-but 1-4% is more typical. These results are from Core i7, in 64-bit mode;
-Core 2 and Opteron show similar results. (I've run with more iterations
-than unusual to make sure the smaller gains don't drown entirely in noise.)
-
- Benchmark Time(ns) CPU(ns) Iterations
- ---------------------------------------------------
- BM_UFlat/0 74665 74428 182055 1.3GB/s html [ +3.1%]
- BM_UFlat/1 714106 711997 19663 940.4MB/s urls [ +4.4%]
- BM_UFlat/2 9820 9789 1427115 12.1GB/s jpg [ -1.2%]
- BM_UFlat/3 30461 30380 465116 2.9GB/s pdf [ +0.8%]
- BM_UFlat/4 301445 300568 46512 1.3GB/s html4 [ +2.2%]
- BM_UFlat/5 29338 29263 479452 801.8MB/s cp [ +1.6%]
- BM_UFlat/6 13004 12970 1000000 819.9MB/s c [ +2.1%]
- BM_UFlat/7 4180 4168 3349282 851.4MB/s lsp [ +1.3%]
- BM_UFlat/8 1026149 1024000 10000 959.0MB/s xls [+10.7%]
- BM_UFlat/9 237441 236830 59072 612.4MB/s txt1 [ +0.3%]
- BM_UFlat/10 203966 203298 69307 587.2MB/s txt2 [ +0.8%]
- BM_UFlat/11 627230 625000 22400 651.2MB/s txt3 [ +0.7%]
- BM_UFlat/12 836188 833979 16787 551.0MB/s txt4 [ +1.3%]
- BM_UFlat/13 351904 350750 39886 1.4GB/s bin [ +3.8%]
- BM_UFlat/14 45685 45562 308370 800.4MB/s sum [ +5.9%]
- BM_UFlat/15 5286 5270 2656546 764.9MB/s man [ +1.5%]
- BM_UFlat/16 78774 78544 178117 1.4GB/s pb [ +4.3%]
- BM_UFlat/17 242270 241345 58091 728.3MB/s gaviota [ +1.2%]
- BM_UValidate/0 42149 42000 333333 2.3GB/s html [ -3.0%]
- BM_UValidate/1 432741 431303 32483 1.5GB/s urls [ +7.8%]
- BM_UValidate/2 198 197 71428571 600.7GB/s jpg [+16.8%]
- BM_UValidate/3 14560 14521 965517 6.1GB/s pdf [ -4.1%]
- BM_UValidate/4 169065 168671 83832 2.3GB/s html4 [ -2.9%]
-
-R=jeff
-
-Revision created by MOE tool push_codebase.
-
-------------------------------------------------------------------------
-r40 | snappy.mirrorbot@gmail.com | 2011-06-03 00:57:41 +0200 (Fri, 03 Jun 2011) | 2 lines
-
-Release Snappy 1.0.3.
-
-------------------------------------------------------------------------
-r39 | snappy.mirrorbot@gmail.com | 2011-06-02 20:06:54 +0200 (Thu, 02 Jun 2011) | 11 lines
-
-Remove an unneeded goto in the decompressor; it turns out that the
-state of ip_ after decompression (or attempted decompresion) is
-completely irrelevant, so we don't need the trailer.
-
-Performance is, as expected, mostly flat -- there's a curious ~3-5%
-loss in the "lsp" test, but that test case is so short it is hard to say
-anything definitive about why (most likely, it's some sort of
-unrelated effect).
-
-R=jeff
-
-------------------------------------------------------------------------
-r38 | snappy.mirrorbot@gmail.com | 2011-06-02 19:59:40 +0200 (Thu, 02 Jun 2011) | 52 lines
-
-Speed up decompression by caching ip_.
-
-It is seemingly hard for the compiler to understand that ip_, the current input
-pointer into the compressed data stream, can not alias on anything else, and
-thus using it directly will incur memory traffic as it cannot be kept in a
-register. The code already knew about this and cached it into a local
-variable, but since Step() only decoded one tag, it had to move ip_ back into
-place between every tag. This seems to have cost us a significant amount of
-performance, so changing Step() into a function that decodes as much as it can
-before it saves ip_ back and returns. (Note that Step() was already inlined,
-so it is not the manual inlining that buys the performance here.)
-
-The wins are about 3-6% for Core 2, 6-13% on Core i7 and 5-12% on Opteron
-(for plain array-to-array decompression, in 64-bit opt mode).
-
-There is a tiny difference in the behavior here; if an invalid literal is
-encountered (ie., the writer refuses the Append() operation), ip_ will now
-point to the byte past the tag byte, instead of where the literal was
-originally thought to end. However, we don't use ip_ for anything after
-DecompressAllTags() has returned, so this should not change external behavior
-in any way.
-
-Microbenchmark results for Core i7, 64-bit (Opteron results are similar):
-
-Benchmark Time(ns) CPU(ns) Iterations
----------------------------------------------------
-BM_UFlat/0 79134 79110 8835 1.2GB/s html [ +6.2%]
-BM_UFlat/1 786126 786096 891 851.8MB/s urls [+10.0%]
-BM_UFlat/2 9948 9948 69125 11.9GB/s jpg [ -1.3%]
-BM_UFlat/3 31999 31998 21898 2.7GB/s pdf [ +6.5%]
-BM_UFlat/4 318909 318829 2204 1.2GB/s html4 [ +6.5%]
-BM_UFlat/5 31384 31390 22363 747.5MB/s cp [ +9.2%]
-BM_UFlat/6 14037 14034 49858 757.7MB/s c [+10.6%]
-BM_UFlat/7 4612 4612 151395 769.5MB/s lsp [ +9.5%]
-BM_UFlat/8 1203174 1203007 582 816.3MB/s xls [+19.3%]
-BM_UFlat/9 253869 253955 2757 571.1MB/s txt1 [+11.4%]
-BM_UFlat/10 219292 219290 3194 544.4MB/s txt2 [+12.1%]
-BM_UFlat/11 672135 672131 1000 605.5MB/s txt3 [+11.2%]
-BM_UFlat/12 902512 902492 776 509.2MB/s txt4 [+12.5%]
-BM_UFlat/13 372110 371998 1881 1.3GB/s bin [ +5.8%]
-BM_UFlat/14 50407 50407 10000 723.5MB/s sum [+13.5%]
-BM_UFlat/15 5699 5701 100000 707.2MB/s man [+12.4%]
-BM_UFlat/16 83448 83424 8383 1.3GB/s pb [ +5.7%]
-BM_UFlat/17 256958 256963 2723 684.1MB/s gaviota [ +7.9%]
-BM_UValidate/0 42795 42796 16351 2.2GB/s html [+25.8%]
-BM_UValidate/1 490672 490622 1427 1.3GB/s urls [+22.7%]
-BM_UValidate/2 237 237 2950297 499.0GB/s jpg [+24.9%]
-BM_UValidate/3 14610 14611 47901 6.0GB/s pdf [+26.8%]
-BM_UValidate/4 171973 171990 4071 2.2GB/s html4 [+25.7%]
-
-
-
-------------------------------------------------------------------------
-r37 | snappy.mirrorbot@gmail.com | 2011-05-17 10:48:25 +0200 (Tue, 17 May 2011) | 10 lines
-
-
-Fix the numbering of the headlines in the Snappy format description.
-
-R=csilvers
-DELTA=4 (0 added, 0 deleted, 4 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=1906
-
-------------------------------------------------------------------------
-r36 | snappy.mirrorbot@gmail.com | 2011-05-16 10:59:18 +0200 (Mon, 16 May 2011) | 12 lines
-
-
-Fix public issue #32: Add compressed format documentation for Snappy.
-This text is new, but an earlier version from Zeev Tarantov was used
-as reference.
-
-R=csilvers
-DELTA=112 (111 added, 0 deleted, 1 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=1867
-
-------------------------------------------------------------------------
-r35 | snappy.mirrorbot@gmail.com | 2011-05-09 23:29:02 +0200 (Mon, 09 May 2011) | 12 lines
-
-
-Fix public issue #39: Pick out the median runs based on CPU time,
-not real time. Also, use nth_element instead of sort, since we
-only need one element.
-
-R=csilvers
-DELTA=5 (3 added, 0 deleted, 2 changed)
-
-
-Revision created by MOE tool push_codebase.
-MOE_MIGRATION=1799
-
-------------------------------------------------------------------------
-r34 | snappy.mirrorbot@gmail.com | 2011-05-09 23:28:45 +0200 (Mon, 09 May 2011) | 19 lines
-
-
-Fix public issue #38: M
<TRUNCATED>
[44/51] [partial] orc git commit: ORC-204 Update and use CMake
External Project to build C++ compression libraries.
Posted by om...@apache.org.
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/snappy-1.1.2/aclocal.m4
----------------------------------------------------------------------
diff --git a/c++/libs/snappy-1.1.2/aclocal.m4 b/c++/libs/snappy-1.1.2/aclocal.m4
deleted file mode 100644
index b4c1d52..0000000
--- a/c++/libs/snappy-1.1.2/aclocal.m4
+++ /dev/null
@@ -1,9738 +0,0 @@
-# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-# Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-m4_ifndef([AC_AUTOCONF_VERSION],
- [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
-[m4_warning([this file was generated for autoconf 2.68.
-You have another version of autoconf. It may work, but is not guaranteed to.
-If you have problems, you may need to regenerate the build system entirely.
-To do so, use the procedure documented by the package, typically `autoreconf'.])])
-
-# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
-# Written by Gordon Matzigkeit, 1996
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-m4_define([_LT_COPYING], [dnl
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
-# Written by Gordon Matzigkeit, 1996
-#
-# This file is part of GNU Libtool.
-#
-# GNU Libtool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
-#
-# GNU Libtool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-])
-
-# serial 57 LT_INIT
-
-
-# LT_PREREQ(VERSION)
-# ------------------
-# Complain and exit if this libtool version is less that VERSION.
-m4_defun([LT_PREREQ],
-[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
- [m4_default([$3],
- [m4_fatal([Libtool version $1 or higher is required],
- 63)])],
- [$2])])
-
-
-# _LT_CHECK_BUILDDIR
-# ------------------
-# Complain if the absolute build directory name contains unusual characters
-m4_defun([_LT_CHECK_BUILDDIR],
-[case `pwd` in
- *\ * | *\ *)
- AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
-esac
-])
-
-
-# LT_INIT([OPTIONS])
-# ------------------
-AC_DEFUN([LT_INIT],
-[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
-AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
-AC_BEFORE([$0], [LT_LANG])dnl
-AC_BEFORE([$0], [LT_OUTPUT])dnl
-AC_BEFORE([$0], [LTDL_INIT])dnl
-m4_require([_LT_CHECK_BUILDDIR])dnl
-
-dnl Autoconf doesn't catch unexpanded LT_ macros by default:
-m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
-m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
-dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
-dnl unless we require an AC_DEFUNed macro:
-AC_REQUIRE([LTOPTIONS_VERSION])dnl
-AC_REQUIRE([LTSUGAR_VERSION])dnl
-AC_REQUIRE([LTVERSION_VERSION])dnl
-AC_REQUIRE([LTOBSOLETE_VERSION])dnl
-m4_require([_LT_PROG_LTMAIN])dnl
-
-_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
-
-dnl Parse OPTIONS
-_LT_SET_OPTIONS([$0], [$1])
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-_LT_SETUP
-
-# Only expand once:
-m4_define([LT_INIT])
-])# LT_INIT
-
-# Old names:
-AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
-AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
-dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
-
-
-# _LT_CC_BASENAME(CC)
-# -------------------
-# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
-m4_defun([_LT_CC_BASENAME],
-[for cc_temp in $1""; do
- case $cc_temp in
- compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
- distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
-])
-
-
-# _LT_FILEUTILS_DEFAULTS
-# ----------------------
-# It is okay to use these file commands and assume they have been set
-# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
-m4_defun([_LT_FILEUTILS_DEFAULTS],
-[: ${CP="cp -f"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-])# _LT_FILEUTILS_DEFAULTS
-
-
-# _LT_SETUP
-# ---------
-m4_defun([_LT_SETUP],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
-AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
-
-_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
-dnl
-_LT_DECL([], [host_alias], [0], [The host system])dnl
-_LT_DECL([], [host], [0])dnl
-_LT_DECL([], [host_os], [0])dnl
-dnl
-_LT_DECL([], [build_alias], [0], [The build system])dnl
-_LT_DECL([], [build], [0])dnl
-_LT_DECL([], [build_os], [0])dnl
-dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([LT_PATH_LD])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-test -z "$LN_S" && LN_S="ln -s"
-_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
-dnl
-AC_REQUIRE([LT_CMD_MAX_LEN])dnl
-_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
-_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
-dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_CHECK_SHELL_FEATURES])dnl
-m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
-m4_require([_LT_CMD_RELOAD])dnl
-m4_require([_LT_CHECK_MAGIC_METHOD])dnl
-m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
-m4_require([_LT_CMD_OLD_ARCHIVE])dnl
-m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
-m4_require([_LT_WITH_SYSROOT])dnl
-
-_LT_CONFIG_LIBTOOL_INIT([
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-])
-if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-
-_LT_CHECK_OBJDIR
-
-m4_require([_LT_TAG_COMPILER])dnl
-
-case $host_os in
-aix3*)
- # AIX sometimes has problems with the GCC collect2 program. For some
- # reason, if we set the COLLECT_NAMES environment variable, the problems
- # vanish in a puff of smoke.
- if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
- fi
- ;;
-esac
-
-# Global variables:
-ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$LD" && LD=ld
-test -z "$ac_objext" && ac_objext=o
-
-_LT_CC_BASENAME([$compiler])
-
-# Only perform the check for file, if the check method requires it
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- _LT_PATH_MAGIC
- fi
- ;;
-esac
-
-# Use C for the default configuration in the libtool script
-LT_SUPPORTED_TAG([CC])
-_LT_LANG_C_CONFIG
-_LT_LANG_DEFAULT_CONFIG
-_LT_CONFIG_COMMANDS
-])# _LT_SETUP
-
-
-# _LT_PREPARE_SED_QUOTE_VARS
-# --------------------------
-# Define a few sed substitution that help us do robust quoting.
-m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
-[# Backslashify metacharacters that are still active within
-# double-quoted strings.
-sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([["`\\]]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-])
-
-# _LT_PROG_LTMAIN
-# ---------------
-# Note that this code is called both from `configure', and `config.status'
-# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
-# `config.status' has no value for ac_aux_dir unless we are using Automake,
-# so we pass a copy along to make sure it has a sensible value anyway.
-m4_defun([_LT_PROG_LTMAIN],
-[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
-_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
-ltmain="$ac_aux_dir/ltmain.sh"
-])# _LT_PROG_LTMAIN
-
-
-
-# So that we can recreate a full libtool script including additional
-# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
-# in macros and then make a single call at the end using the `libtool'
-# label.
-
-
-# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
-# ----------------------------------------
-# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
-m4_define([_LT_CONFIG_LIBTOOL_INIT],
-[m4_ifval([$1],
- [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
- [$1
-])])])
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_INIT])
-
-
-# _LT_CONFIG_LIBTOOL([COMMANDS])
-# ------------------------------
-# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
-m4_define([_LT_CONFIG_LIBTOOL],
-[m4_ifval([$1],
- [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
- [$1
-])])])
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
-
-
-# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
-# -----------------------------------------------------
-m4_defun([_LT_CONFIG_SAVE_COMMANDS],
-[_LT_CONFIG_LIBTOOL([$1])
-_LT_CONFIG_LIBTOOL_INIT([$2])
-])
-
-
-# _LT_FORMAT_COMMENT([COMMENT])
-# -----------------------------
-# Add leading comment marks to the start of each line, and a trailing
-# full-stop to the whole comment if one is not present already.
-m4_define([_LT_FORMAT_COMMENT],
-[m4_ifval([$1], [
-m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
- [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
-)])
-
-
-
-
-
-# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
-# -------------------------------------------------------------------
-# CONFIGNAME is the name given to the value in the libtool script.
-# VARNAME is the (base) name used in the configure script.
-# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
-# VARNAME. Any other value will be used directly.
-m4_define([_LT_DECL],
-[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
- [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
- [m4_ifval([$1], [$1], [$2])])
- lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
- m4_ifval([$4],
- [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
- lt_dict_add_subkey([lt_decl_dict], [$2],
- [tagged?], [m4_ifval([$5], [yes], [no])])])
-])
-
-
-# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
-# --------------------------------------------------------
-m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
-
-
-# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
-# ------------------------------------------------
-m4_define([lt_decl_tag_varnames],
-[_lt_decl_filter([tagged?], [yes], $@)])
-
-
-# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
-# ---------------------------------------------------------
-m4_define([_lt_decl_filter],
-[m4_case([$#],
- [0], [m4_fatal([$0: too few arguments: $#])],
- [1], [m4_fatal([$0: too few arguments: $#: $1])],
- [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
- [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
- [lt_dict_filter([lt_decl_dict], $@)])[]dnl
-])
-
-
-# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
-# --------------------------------------------------
-m4_define([lt_decl_quote_varnames],
-[_lt_decl_filter([value], [1], $@)])
-
-
-# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
-# ---------------------------------------------------
-m4_define([lt_decl_dquote_varnames],
-[_lt_decl_filter([value], [2], $@)])
-
-
-# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
-# ---------------------------------------------------
-m4_define([lt_decl_varnames_tagged],
-[m4_assert([$# <= 2])dnl
-_$0(m4_quote(m4_default([$1], [[, ]])),
- m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
- m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
-m4_define([_lt_decl_varnames_tagged],
-[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
-
-
-# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
-# ------------------------------------------------
-m4_define([lt_decl_all_varnames],
-[_$0(m4_quote(m4_default([$1], [[, ]])),
- m4_if([$2], [],
- m4_quote(lt_decl_varnames),
- m4_quote(m4_shift($@))))[]dnl
-])
-m4_define([_lt_decl_all_varnames],
-[lt_join($@, lt_decl_varnames_tagged([$1],
- lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
-])
-
-
-# _LT_CONFIG_STATUS_DECLARE([VARNAME])
-# ------------------------------------
-# Quote a variable value, and forward it to `config.status' so that its
-# declaration there will have the same value as in `configure'. VARNAME
-# must have a single quote delimited value for this to work.
-m4_define([_LT_CONFIG_STATUS_DECLARE],
-[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
-
-
-# _LT_CONFIG_STATUS_DECLARATIONS
-# ------------------------------
-# We delimit libtool config variables with single quotes, so when
-# we write them to config.status, we have to be sure to quote all
-# embedded single quotes properly. In configure, this macro expands
-# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
-#
-# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
-m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
-[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
- [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
-
-
-# _LT_LIBTOOL_TAGS
-# ----------------
-# Output comment and list of tags supported by the script
-m4_defun([_LT_LIBTOOL_TAGS],
-[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
-available_tags="_LT_TAGS"dnl
-])
-
-
-# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
-# -----------------------------------
-# Extract the dictionary values for VARNAME (optionally with TAG) and
-# expand to a commented shell variable setting:
-#
-# # Some comment about what VAR is for.
-# visible_name=$lt_internal_name
-m4_define([_LT_LIBTOOL_DECLARE],
-[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
- [description])))[]dnl
-m4_pushdef([_libtool_name],
- m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
-m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
- [0], [_libtool_name=[$]$1],
- [1], [_libtool_name=$lt_[]$1],
- [2], [_libtool_name=$lt_[]$1],
- [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
-m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
-])
-
-
-# _LT_LIBTOOL_CONFIG_VARS
-# -----------------------
-# Produce commented declarations of non-tagged libtool config variables
-# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
-# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
-# section) are produced by _LT_LIBTOOL_TAG_VARS.
-m4_defun([_LT_LIBTOOL_CONFIG_VARS],
-[m4_foreach([_lt_var],
- m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
- [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
-
-
-# _LT_LIBTOOL_TAG_VARS(TAG)
-# -------------------------
-m4_define([_LT_LIBTOOL_TAG_VARS],
-[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
- [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
-
-
-# _LT_TAGVAR(VARNAME, [TAGNAME])
-# ------------------------------
-m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
-
-
-# _LT_CONFIG_COMMANDS
-# -------------------
-# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
-# variables for single and double quote escaping we saved from calls
-# to _LT_DECL, we can put quote escaped variables declarations
-# into `config.status', and then the shell code to quote escape them in
-# for loops in `config.status'. Finally, any additional code accumulated
-# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
-m4_defun([_LT_CONFIG_COMMANDS],
-[AC_PROVIDE_IFELSE([LT_OUTPUT],
- dnl If the libtool generation code has been placed in $CONFIG_LT,
- dnl instead of duplicating it all over again into config.status,
- dnl then we will have config.status run $CONFIG_LT later, so it
- dnl needs to know what name is stored there:
- [AC_CONFIG_COMMANDS([libtool],
- [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
- dnl If the libtool generation code is destined for config.status,
- dnl expand the accumulated commands and init code now:
- [AC_CONFIG_COMMANDS([libtool],
- [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
-])#_LT_CONFIG_COMMANDS
-
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
-[
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-sed_quote_subst='$sed_quote_subst'
-double_quote_subst='$double_quote_subst'
-delay_variable_subst='$delay_variable_subst'
-_LT_CONFIG_STATUS_DECLARATIONS
-LTCC='$LTCC'
-LTCFLAGS='$LTCFLAGS'
-compiler='$compiler_DEFAULT'
-
-# A function that is used when there is no print builtin or printf.
-func_fallback_echo ()
-{
- eval 'cat <<_LTECHO_EOF
-\$[]1
-_LTECHO_EOF'
-}
-
-# Quote evaled strings.
-for var in lt_decl_all_varnames([[ \
-]], lt_decl_quote_varnames); do
- case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
- *[[\\\\\\\`\\"\\\$]]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
- ;;
- *)
- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-# Double-quote double-evaled strings.
-for var in lt_decl_all_varnames([[ \
-]], lt_decl_dquote_varnames); do
- case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
- *[[\\\\\\\`\\"\\\$]]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
- ;;
- *)
- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-_LT_OUTPUT_LIBTOOL_INIT
-])
-
-# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
-# ------------------------------------
-# Generate a child script FILE with all initialization necessary to
-# reuse the environment learned by the parent script, and make the
-# file executable. If COMMENT is supplied, it is inserted after the
-# `#!' sequence but before initialization text begins. After this
-# macro, additional text can be appended to FILE to form the body of
-# the child script. The macro ends with non-zero status if the
-# file could not be fully written (such as if the disk is full).
-m4_ifdef([AS_INIT_GENERATED],
-[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
-[m4_defun([_LT_GENERATED_FILE_INIT],
-[m4_require([AS_PREPARE])]dnl
-[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
-[lt_write_fail=0
-cat >$1 <<_ASEOF || lt_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-$2
-SHELL=\${CONFIG_SHELL-$SHELL}
-export SHELL
-_ASEOF
-cat >>$1 <<\_ASEOF || lt_write_fail=1
-AS_SHELL_SANITIZE
-_AS_PREPARE
-exec AS_MESSAGE_FD>&1
-_ASEOF
-test $lt_write_fail = 0 && chmod +x $1[]dnl
-m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
-
-# LT_OUTPUT
-# ---------
-# This macro allows early generation of the libtool script (before
-# AC_OUTPUT is called), incase it is used in configure for compilation
-# tests.
-AC_DEFUN([LT_OUTPUT],
-[: ${CONFIG_LT=./config.lt}
-AC_MSG_NOTICE([creating $CONFIG_LT])
-_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
-[# Run this file to recreate a libtool stub with the current configuration.])
-
-cat >>"$CONFIG_LT" <<\_LTEOF
-lt_cl_silent=false
-exec AS_MESSAGE_LOG_FD>>config.log
-{
- echo
- AS_BOX([Running $as_me.])
-} >&AS_MESSAGE_LOG_FD
-
-lt_cl_help="\
-\`$as_me' creates a local libtool stub from the current configuration,
-for use in further configure time tests before the real libtool is
-generated.
-
-Usage: $[0] [[OPTIONS]]
-
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet do not print progress messages
- -d, --debug don't remove temporary files
-
-Report bugs to <bu...@gnu.org>."
-
-lt_cl_version="\
-m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
-m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
-configured by $[0], generated by m4_PACKAGE_STRING.
-
-Copyright (C) 2011 Free Software Foundation, Inc.
-This config.lt script is free software; the Free Software Foundation
-gives unlimited permision to copy, distribute and modify it."
-
-while test $[#] != 0
-do
- case $[1] in
- --version | --v* | -V )
- echo "$lt_cl_version"; exit 0 ;;
- --help | --h* | -h )
- echo "$lt_cl_help"; exit 0 ;;
- --debug | --d* | -d )
- debug=: ;;
- --quiet | --q* | --silent | --s* | -q )
- lt_cl_silent=: ;;
-
- -*) AC_MSG_ERROR([unrecognized option: $[1]
-Try \`$[0] --help' for more information.]) ;;
-
- *) AC_MSG_ERROR([unrecognized argument: $[1]
-Try \`$[0] --help' for more information.]) ;;
- esac
- shift
-done
-
-if $lt_cl_silent; then
- exec AS_MESSAGE_FD>/dev/null
-fi
-_LTEOF
-
-cat >>"$CONFIG_LT" <<_LTEOF
-_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
-_LTEOF
-
-cat >>"$CONFIG_LT" <<\_LTEOF
-AC_MSG_NOTICE([creating $ofile])
-_LT_OUTPUT_LIBTOOL_COMMANDS
-AS_EXIT(0)
-_LTEOF
-chmod +x "$CONFIG_LT"
-
-# configure is writing to config.log, but config.lt does its own redirection,
-# appending to config.log, which fails on DOS, as config.log is still kept
-# open by configure. Here we exec the FD to /dev/null, effectively closing
-# config.log, so it can be properly (re)opened and appended to by config.lt.
-lt_cl_success=:
-test "$silent" = yes &&
- lt_config_lt_args="$lt_config_lt_args --quiet"
-exec AS_MESSAGE_LOG_FD>/dev/null
-$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
-exec AS_MESSAGE_LOG_FD>>config.log
-$lt_cl_success || AS_EXIT(1)
-])# LT_OUTPUT
-
-
-# _LT_CONFIG(TAG)
-# ---------------
-# If TAG is the built-in tag, create an initial libtool script with a
-# default configuration from the untagged config vars. Otherwise add code
-# to config.status for appending the configuration named by TAG from the
-# matching tagged config vars.
-m4_defun([_LT_CONFIG],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-_LT_CONFIG_SAVE_COMMANDS([
- m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
- m4_if(_LT_TAG, [C], [
- # See if we are running on zsh, and set the options which allow our
- # commands through without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
- fi
-
- cfgfile="${ofile}T"
- trap "$RM \"$cfgfile\"; exit 1" 1 2 15
- $RM "$cfgfile"
-
- cat <<_LT_EOF >> "$cfgfile"
-#! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-_LT_COPYING
-_LT_LIBTOOL_TAGS
-
-# ### BEGIN LIBTOOL CONFIG
-_LT_LIBTOOL_CONFIG_VARS
-_LT_LIBTOOL_TAG_VARS
-# ### END LIBTOOL CONFIG
-
-_LT_EOF
-
- case $host_os in
- aix3*)
- cat <<\_LT_EOF >> "$cfgfile"
-# AIX sometimes has problems with the GCC collect2 program. For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
-fi
-_LT_EOF
- ;;
- esac
-
- _LT_PROG_LTMAIN
-
- # We use sed instead of cat because bash on DJGPP gets confused if
- # if finds mixed CR/LF and LF-only lines. Since sed operates in
- # text mode, it properly converts lines to CR/LF. This bash problem
- # is reportedly fixed, but why not run on old versions too?
- sed '$q' "$ltmain" >> "$cfgfile" \
- || (rm -f "$cfgfile"; exit 1)
-
- _LT_PROG_REPLACE_SHELLFNS
-
- mv -f "$cfgfile" "$ofile" ||
- (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
- chmod +x "$ofile"
-],
-[cat <<_LT_EOF >> "$ofile"
-
-dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
-dnl in a comment (ie after a #).
-# ### BEGIN LIBTOOL TAG CONFIG: $1
-_LT_LIBTOOL_TAG_VARS(_LT_TAG)
-# ### END LIBTOOL TAG CONFIG: $1
-_LT_EOF
-])dnl /m4_if
-],
-[m4_if([$1], [], [
- PACKAGE='$PACKAGE'
- VERSION='$VERSION'
- TIMESTAMP='$TIMESTAMP'
- RM='$RM'
- ofile='$ofile'], [])
-])dnl /_LT_CONFIG_SAVE_COMMANDS
-])# _LT_CONFIG
-
-
-# LT_SUPPORTED_TAG(TAG)
-# ---------------------
-# Trace this macro to discover what tags are supported by the libtool
-# --tag option, using:
-# autoconf --trace 'LT_SUPPORTED_TAG:$1'
-AC_DEFUN([LT_SUPPORTED_TAG], [])
-
-
-# C support is built-in for now
-m4_define([_LT_LANG_C_enabled], [])
-m4_define([_LT_TAGS], [])
-
-
-# LT_LANG(LANG)
-# -------------
-# Enable libtool support for the given language if not already enabled.
-AC_DEFUN([LT_LANG],
-[AC_BEFORE([$0], [LT_OUTPUT])dnl
-m4_case([$1],
- [C], [_LT_LANG(C)],
- [C++], [_LT_LANG(CXX)],
- [Go], [_LT_LANG(GO)],
- [Java], [_LT_LANG(GCJ)],
- [Fortran 77], [_LT_LANG(F77)],
- [Fortran], [_LT_LANG(FC)],
- [Windows Resource], [_LT_LANG(RC)],
- [m4_ifdef([_LT_LANG_]$1[_CONFIG],
- [_LT_LANG($1)],
- [m4_fatal([$0: unsupported language: "$1"])])])dnl
-])# LT_LANG
-
-
-# _LT_LANG(LANGNAME)
-# ------------------
-m4_defun([_LT_LANG],
-[m4_ifdef([_LT_LANG_]$1[_enabled], [],
- [LT_SUPPORTED_TAG([$1])dnl
- m4_append([_LT_TAGS], [$1 ])dnl
- m4_define([_LT_LANG_]$1[_enabled], [])dnl
- _LT_LANG_$1_CONFIG($1)])dnl
-])# _LT_LANG
-
-
-m4_ifndef([AC_PROG_GO], [
-# NOTE: This macro has been submitted for inclusion into #
-# GNU Autoconf as AC_PROG_GO. When it is available in #
-# a released version of Autoconf we should remove this #
-# macro and use it instead. #
-m4_defun([AC_PROG_GO],
-[AC_LANG_PUSH(Go)dnl
-AC_ARG_VAR([GOC], [Go compiler command])dnl
-AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
-_AC_ARG_VAR_LDFLAGS()dnl
-AC_CHECK_TOOL(GOC, gccgo)
-if test -z "$GOC"; then
- if test -n "$ac_tool_prefix"; then
- AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
- fi
-fi
-if test -z "$GOC"; then
- AC_CHECK_PROG(GOC, gccgo, gccgo, false)
-fi
-])#m4_defun
-])#m4_ifndef
-
-
-# _LT_LANG_DEFAULT_CONFIG
-# -----------------------
-m4_defun([_LT_LANG_DEFAULT_CONFIG],
-[AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [LT_LANG(CXX)],
- [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
-
-AC_PROVIDE_IFELSE([AC_PROG_F77],
- [LT_LANG(F77)],
- [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
-
-AC_PROVIDE_IFELSE([AC_PROG_FC],
- [LT_LANG(FC)],
- [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
-
-dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
-dnl pulling things in needlessly.
-AC_PROVIDE_IFELSE([AC_PROG_GCJ],
- [LT_LANG(GCJ)],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
- [LT_LANG(GCJ)],
- [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
- [LT_LANG(GCJ)],
- [m4_ifdef([AC_PROG_GCJ],
- [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
- m4_ifdef([A][M_PROG_GCJ],
- [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
- m4_ifdef([LT_PROG_GCJ],
- [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
-
-AC_PROVIDE_IFELSE([AC_PROG_GO],
- [LT_LANG(GO)],
- [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
-
-AC_PROVIDE_IFELSE([LT_PROG_RC],
- [LT_LANG(RC)],
- [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
-])# _LT_LANG_DEFAULT_CONFIG
-
-# Obsolete macros:
-AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
-AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
-AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
-AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
-AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
-dnl AC_DEFUN([AC_LIBTOOL_F77], [])
-dnl AC_DEFUN([AC_LIBTOOL_FC], [])
-dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
-dnl AC_DEFUN([AC_LIBTOOL_RC], [])
-
-
-# _LT_TAG_COMPILER
-# ----------------
-m4_defun([_LT_TAG_COMPILER],
-[AC_REQUIRE([AC_PROG_CC])dnl
-
-_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
-_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
-_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
-_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-])# _LT_TAG_COMPILER
-
-
-# _LT_COMPILER_BOILERPLATE
-# ------------------------
-# Check for compiler boilerplate output or warnings with
-# the simple compiler test code.
-m4_defun([_LT_COMPILER_BOILERPLATE],
-[m4_require([_LT_DECL_SED])dnl
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
-])# _LT_COMPILER_BOILERPLATE
-
-
-# _LT_LINKER_BOILERPLATE
-# ----------------------
-# Check for linker boilerplate output or warnings with
-# the simple link test code.
-m4_defun([_LT_LINKER_BOILERPLATE],
-[m4_require([_LT_DECL_SED])dnl
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$RM -r conftest*
-])# _LT_LINKER_BOILERPLATE
-
-# _LT_REQUIRED_DARWIN_CHECKS
-# -------------------------
-m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
- case $host_os in
- rhapsody* | darwin*)
- AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
- AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
- AC_CHECK_TOOL([LIPO], [lipo], [:])
- AC_CHECK_TOOL([OTOOL], [otool], [:])
- AC_CHECK_TOOL([OTOOL64], [otool64], [:])
- _LT_DECL([], [DSYMUTIL], [1],
- [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
- _LT_DECL([], [NMEDIT], [1],
- [Tool to change global to local symbols on Mac OS X])
- _LT_DECL([], [LIPO], [1],
- [Tool to manipulate fat objects and archives on Mac OS X])
- _LT_DECL([], [OTOOL], [1],
- [ldd/readelf like tool for Mach-O binaries on Mac OS X])
- _LT_DECL([], [OTOOL64], [1],
- [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
-
- AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
- [lt_cv_apple_cc_single_mod=no
- if test -z "${LT_MULTI_MODULE}"; then
- # By default we will add the -single_module flag. You can override
- # by either setting the environment variable LT_MULTI_MODULE
- # non-empty at configure time, or by adding -multi_module to the
- # link flags.
- rm -rf libconftest.dylib*
- echo "int foo(void){return 1;}" > conftest.c
- echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
--dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
- $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
- -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
- _lt_result=$?
- # If there is a non-empty error log, and "single_module"
- # appears in it, assume the flag caused a linker warning
- if test -s conftest.err && $GREP single_module conftest.err; then
- cat conftest.err >&AS_MESSAGE_LOG_FD
- # Otherwise, if the output was created with a 0 exit code from
- # the compiler, it worked.
- elif test -f libconftest.dylib && test $_lt_result -eq 0; then
- lt_cv_apple_cc_single_mod=yes
- else
- cat conftest.err >&AS_MESSAGE_LOG_FD
- fi
- rm -rf libconftest.dylib*
- rm -f conftest.*
- fi])
-
- AC_CACHE_CHECK([for -exported_symbols_list linker flag],
- [lt_cv_ld_exported_symbols_list],
- [lt_cv_ld_exported_symbols_list=no
- save_LDFLAGS=$LDFLAGS
- echo "_main" > conftest.sym
- LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
- [lt_cv_ld_exported_symbols_list=yes],
- [lt_cv_ld_exported_symbols_list=no])
- LDFLAGS="$save_LDFLAGS"
- ])
-
- AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
- [lt_cv_ld_force_load=no
- cat > conftest.c << _LT_EOF
-int forced_loaded() { return 2;}
-_LT_EOF
- echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
- $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
- echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
- $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
- echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
- $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
- cat > conftest.c << _LT_EOF
-int main() { return 0;}
-_LT_EOF
- echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
- $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
- _lt_result=$?
- if test -s conftest.err && $GREP force_load conftest.err; then
- cat conftest.err >&AS_MESSAGE_LOG_FD
- elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
- lt_cv_ld_force_load=yes
- else
- cat conftest.err >&AS_MESSAGE_LOG_FD
- fi
- rm -f conftest.err libconftest.a conftest conftest.c
- rm -rf conftest.dSYM
- ])
- case $host_os in
- rhapsody* | darwin1.[[012]])
- _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
- darwin1.*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
- darwin*) # darwin 5.x on
- # if running on 10.5 or later, the deployment target defaults
- # to the OS version, if on x86, and 10.4, the deployment
- # target defaults to 10.4. Don't you love it?
- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
- 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[[012]]*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
- 10.*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- esac
- ;;
- esac
- if test "$lt_cv_apple_cc_single_mod" = "yes"; then
- _lt_dar_single_mod='$single_module'
- fi
- if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
- _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
- else
- _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
- fi
- if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
- _lt_dsymutil='~$DSYMUTIL $lib || :'
- else
- _lt_dsymutil=
- fi
- ;;
- esac
-])
-
-
-# _LT_DARWIN_LINKER_FEATURES([TAG])
-# ---------------------------------
-# Checks for linker and compiler features on darwin
-m4_defun([_LT_DARWIN_LINKER_FEATURES],
-[
- m4_require([_LT_REQUIRED_DARWIN_CHECKS])
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_automatic, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
- if test "$lt_cv_ld_force_load" = "yes"; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
- m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
- [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
- else
- _LT_TAGVAR(whole_archive_flag_spec, $1)=''
- fi
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
- case $cc_basename in
- ifort*) _lt_dar_can_shared=yes ;;
- *) _lt_dar_can_shared=$GCC ;;
- esac
- if test "$_lt_dar_can_shared" = "yes"; then
- output_verbose_link_cmd=func_echo_all
- _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
- _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
- _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
- m4_if([$1], [CXX],
-[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
- _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
- fi
-],[])
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
-])
-
-# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
-# ----------------------------------
-# Links a minimal program and checks the executable
-# for the system default hardcoded library path. In most cases,
-# this is /usr/lib:/lib, but when the MPI compilers are used
-# the location of the communication and MPI libs are included too.
-# If we don't find anything, use the default library path according
-# to the aix ld manual.
-# Store the results from the different compilers for each TAGNAME.
-# Allow to override them for all tags through lt_cv_aix_libpath.
-m4_defun([_LT_SYS_MODULE_PATH_AIX],
-[m4_require([_LT_DECL_SED])dnl
-if test "${lt_cv_aix_libpath+set}" = set; then
- aix_libpath=$lt_cv_aix_libpath
-else
- AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
- [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
- lt_aix_libpath_sed='[
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\([^ ]*\) *$/\1/
- p
- }
- }]'
- _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
- # Check for a 64-bit object if we didn't find anything.
- if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
- _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
- fi],[])
- if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
- _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
- fi
- ])
- aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
-fi
-])# _LT_SYS_MODULE_PATH_AIX
-
-
-# _LT_SHELL_INIT(ARG)
-# -------------------
-m4_define([_LT_SHELL_INIT],
-[m4_divert_text([M4SH-INIT], [$1
-])])# _LT_SHELL_INIT
-
-
-
-# _LT_PROG_ECHO_BACKSLASH
-# -----------------------
-# Find how we can fake an echo command that does not interpret backslash.
-# In particular, with Autoconf 2.60 or later we add some code to the start
-# of the generated configure script which will find a shell with a builtin
-# printf (which we can use as an echo command).
-m4_defun([_LT_PROG_ECHO_BACKSLASH],
-[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
-ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
-
-AC_MSG_CHECKING([how to print strings])
-# Test print first, because it will be a builtin if present.
-if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
- test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
- ECHO='print -r --'
-elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
- ECHO='printf %s\n'
-else
- # Use this function as a fallback that always works.
- func_fallback_echo ()
- {
- eval 'cat <<_LTECHO_EOF
-$[]1
-_LTECHO_EOF'
- }
- ECHO='func_fallback_echo'
-fi
-
-# func_echo_all arg...
-# Invoke $ECHO with all args, space-separated.
-func_echo_all ()
-{
- $ECHO "$*"
-}
-
-case "$ECHO" in
- printf*) AC_MSG_RESULT([printf]) ;;
- print*) AC_MSG_RESULT([print -r]) ;;
- *) AC_MSG_RESULT([cat]) ;;
-esac
-
-m4_ifdef([_AS_DETECT_SUGGESTED],
-[_AS_DETECT_SUGGESTED([
- test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
- ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
- ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
- ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
- PATH=/empty FPATH=/empty; export PATH FPATH
- test "X`printf %s $ECHO`" = "X$ECHO" \
- || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
-
-_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
-_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
-])# _LT_PROG_ECHO_BACKSLASH
-
-
-# _LT_WITH_SYSROOT
-# ----------------
-AC_DEFUN([_LT_WITH_SYSROOT],
-[AC_MSG_CHECKING([for sysroot])
-AC_ARG_WITH([sysroot],
-[ --with-sysroot[=DIR] Search for dependent libraries within DIR
- (or the compiler's sysroot if not specified).],
-[], [with_sysroot=no])
-
-dnl lt_sysroot will always be passed unquoted. We quote it here
-dnl in case the user passed a directory name.
-lt_sysroot=
-case ${with_sysroot} in #(
- yes)
- if test "$GCC" = yes; then
- lt_sysroot=`$CC --print-sysroot 2>/dev/null`
- fi
- ;; #(
- /*)
- lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
- ;; #(
- no|'')
- ;; #(
- *)
- AC_MSG_RESULT([${with_sysroot}])
- AC_MSG_ERROR([The sysroot must be an absolute path.])
- ;;
-esac
-
- AC_MSG_RESULT([${lt_sysroot:-no}])
-_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
-[dependent libraries, and in which our libraries should be installed.])])
-
-# _LT_ENABLE_LOCK
-# ---------------
-m4_defun([_LT_ENABLE_LOCK],
-[AC_ARG_ENABLE([libtool-lock],
- [AS_HELP_STRING([--disable-libtool-lock],
- [avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.$ac_objext` in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- if test "$lt_cv_prog_gnu_ld" = yes; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -melf32bsmip"
- ;;
- *N32*)
- LD="${LD-ld} -melf32bmipn32"
- ;;
- *64-bit*)
- LD="${LD-ld} -melf64bmip"
- ;;
- esac
- else
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- fi
- rm -rf conftest*
- ;;
-
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
-s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.o` in
- *32-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_i386_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
- ;;
- ppc64-*linux*|powerpc64-*linux*)
- LD="${LD-ld} -m elf32ppclinux"
- ;;
- s390x-*linux*)
- LD="${LD-ld} -m elf_s390"
- ;;
- sparc64-*linux*)
- LD="${LD-ld} -m elf32_sparc"
- ;;
- esac
- ;;
- *64-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_x86_64_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
- ppc*-*linux*|powerpc*-*linux*)
- LD="${LD-ld} -m elf64ppc"
- ;;
- s390*-*linux*|s390*-*tpf*)
- LD="${LD-ld} -m elf64_s390"
- ;;
- sparc*-*linux*)
- LD="${LD-ld} -m elf64_sparc"
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_LANG_PUSH(C)
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
- AC_LANG_POP])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-*-*solaris*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.o` in
- *64-bit*)
- case $lt_cv_prog_gnu_ld in
- yes*)
- case $host in
- i?86-*-solaris*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
- sparc*-*-solaris*)
- LD="${LD-ld} -m elf64_sparc"
- ;;
- esac
- # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
- if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
- LD="${LD-ld}_sol2"
- fi
- ;;
- *)
- if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
- LD="${LD-ld} -64"
- fi
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-esac
-
-need_locks="$enable_libtool_lock"
-])# _LT_ENABLE_LOCK
-
-
-# _LT_PROG_AR
-# -----------
-m4_defun([_LT_PROG_AR],
-[AC_CHECK_TOOLS(AR, [ar], false)
-: ${AR=ar}
-: ${AR_FLAGS=cru}
-_LT_DECL([], [AR], [1], [The archiver])
-_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
-
-AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
- [lt_cv_ar_at_file=no
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
- [echo conftest.$ac_objext > conftest.lst
- lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
- AC_TRY_EVAL([lt_ar_try])
- if test "$ac_status" -eq 0; then
- # Ensure the archiver fails upon bogus file names.
- rm -f conftest.$ac_objext libconftest.a
- AC_TRY_EVAL([lt_ar_try])
- if test "$ac_status" -ne 0; then
- lt_cv_ar_at_file=@
- fi
- fi
- rm -f conftest.* libconftest.a
- ])
- ])
-
-if test "x$lt_cv_ar_at_file" = xno; then
- archiver_list_spec=
-else
- archiver_list_spec=$lt_cv_ar_at_file
-fi
-_LT_DECL([], [archiver_list_spec], [1],
- [How to feed a file listing to the archiver])
-])# _LT_PROG_AR
-
-
-# _LT_CMD_OLD_ARCHIVE
-# -------------------
-m4_defun([_LT_CMD_OLD_ARCHIVE],
-[_LT_PROG_AR
-
-AC_CHECK_TOOL(STRIP, strip, :)
-test -z "$STRIP" && STRIP=:
-_LT_DECL([], [STRIP], [1], [A symbol stripping program])
-
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-test -z "$RANLIB" && RANLIB=:
-_LT_DECL([], [RANLIB], [1],
- [Commands used to install an old-style archive])
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
- case $host_os in
- openbsd*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
- ;;
- *)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
- ;;
- esac
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
-fi
-
-case $host_os in
- darwin*)
- lock_old_archive_extraction=yes ;;
- *)
- lock_old_archive_extraction=no ;;
-esac
-_LT_DECL([], [old_postinstall_cmds], [2])
-_LT_DECL([], [old_postuninstall_cmds], [2])
-_LT_TAGDECL([], [old_archive_cmds], [2],
- [Commands used to build an old-style archive])
-_LT_DECL([], [lock_old_archive_extraction], [0],
- [Whether to use a lock for old archive extraction])
-])# _LT_CMD_OLD_ARCHIVE
-
-
-# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([_LT_COMPILER_OPTION],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_CACHE_CHECK([$1], [$2],
- [$2=no
- m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$3"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&AS_MESSAGE_LOG_FD
- echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- $2=yes
- fi
- fi
- $RM conftest*
-])
-
-if test x"[$]$2" = xyes; then
- m4_if([$5], , :, [$5])
-else
- m4_if([$6], , :, [$6])
-fi
-])# _LT_COMPILER_OPTION
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
-
-
-# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-# [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------
-# Check whether the given linker option works
-AC_DEFUN([_LT_LINKER_OPTION],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_CACHE_CHECK([$1], [$2],
- [$2=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $3"
- echo "$lt_simple_link_test_code" > conftest.$ac_ext
- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
- # The linker can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- # Append any errors to the config.log.
- cat conftest.err 1>&AS_MESSAGE_LOG_FD
- $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if diff conftest.exp conftest.er2 >/dev/null; then
- $2=yes
- fi
- else
- $2=yes
- fi
- fi
- $RM -r conftest*
- LDFLAGS="$save_LDFLAGS"
-])
-
-if test x"[$]$2" = xyes; then
- m4_if([$4], , :, [$4])
-else
- m4_if([$5], , :, [$5])
-fi
-])# _LT_LINKER_OPTION
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
-
-
-# LT_CMD_MAX_LEN
-#---------------
-AC_DEFUN([LT_CMD_MAX_LEN],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# find the maximum length of command line arguments
-AC_MSG_CHECKING([the maximum length of command line arguments])
-AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
- i=0
- teststring="ABCD"
-
- case $build_os in
- msdosdjgpp*)
- # On DJGPP, this test can blow up pretty badly due to problems in libc
- # (any single argument exceeding 2000 bytes causes a buffer overrun
- # during glob expansion). Even if it were fixed, the result of this
- # check would be larger than it should be.
- lt_cv_sys_max_cmd_len=12288; # 12K is about right
- ;;
-
- gnu*)
- # Under GNU Hurd, this test is not required because there is
- # no limit to the length of command line arguments.
- # Libtool will interpret -1 as no limit whatsoever
- lt_cv_sys_max_cmd_len=-1;
- ;;
-
- cygwin* | mingw* | cegcc*)
- # On Win9x/ME, this test blows up -- it succeeds, but takes
- # about 5 minutes as the teststring grows exponentially.
- # Worse, since 9x/ME are not pre-emptively multitasking,
- # you end up with a "frozen" computer, even though with patience
- # the test eventually succeeds (with a max line length of 256k).
- # Instead, let's just punt: use the minimum linelength reported by
- # all of the supported platforms: 8192 (on NT/2K/XP).
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- mint*)
- # On MiNT this can take a long time and run out of memory.
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- amigaos*)
- # On AmigaOS with pdksh, this test takes hours, literally.
- # So we just punt and use a minimum line length of 8192.
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- elif test -x /usr/sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
- else
- lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
- fi
- # And add a safety zone
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- ;;
-
- interix*)
- # We know the value 262144 and hardcode it with a safety zone (like BSD)
- lt_cv_sys_max_cmd_len=196608
- ;;
-
- os2*)
- # The test takes a long time on OS/2.
- lt_cv_sys_max_cmd_len=8192
- ;;
-
- osf*)
- # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
- # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
- # nice to cause kernel panics so lets avoid the loop below.
- # First set a reasonable default.
- lt_cv_sys_max_cmd_len=16384
- #
- if test -x /sbin/sysconfig; then
- case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
- *1*) lt_cv_sys_max_cmd_len=-1 ;;
- esac
- fi
- ;;
- sco3.2v5*)
- lt_cv_sys_max_cmd_len=102400
- ;;
- sysv5* | sco5v6* | sysv4.2uw2*)
- kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
- if test -n "$kargmax"; then
- lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
- else
- lt_cv_sys_max_cmd_len=32768
- fi
- ;;
- *)
- lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
- if test -n "$lt_cv_sys_max_cmd_len"; then
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- else
- # Make teststring a little bigger before we do anything with it.
- # a 1K string should be a reasonable start.
- for i in 1 2 3 4 5 6 7 8 ; do
- teststring=$teststring$teststring
- done
- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
- # If test is not a shell built-in, we'll probably end up computing a
- # maximum length that is only half of the actual maximum length, but
- # we can't tell.
- while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
- = "X$teststring$teststring"; } >/dev/null 2>&1 &&
- test $i != 17 # 1/2 MB should be enough
- do
- i=`expr $i + 1`
- teststring=$teststring$teststring
- done
- # Only check the string length outside the loop.
- lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
- teststring=
- # Add a significant safety factor because C++ compilers can tack on
- # massive amounts of additional arguments before passing them to the
- # linker. It appears as though 1/2 is a usable value.
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
- fi
- ;;
- esac
-])
-if test -n $lt_cv_sys_max_cmd_len ; then
- AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
-else
- AC_MSG_RESULT(none)
-fi
-max_cmd_len=$lt_cv_sys_max_cmd_len
-_LT_DECL([], [max_cmd_len], [0],
- [What is the maximum length of a command?])
-])# LT_CMD_MAX_LEN
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
-
-
-# _LT_HEADER_DLFCN
-# ----------------
-m4_defun([_LT_HEADER_DLFCN],
-[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
-])# _LT_HEADER_DLFCN
-
-
-# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
-# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
-# ----------------------------------------------------------------
-m4_defun([_LT_TRY_DLOPEN_SELF],
-[m4_require([_LT_HEADER_DLFCN])dnl
-if test "$cross_compiling" = yes; then :
- [$4]
-else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
-[#line $LINENO "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LT_DLGLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LT_DLGLOBAL DL_GLOBAL
-# else
-# define LT_DLGLOBAL 0
-# endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LT_DLLAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LT_DLLAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LT_DLLAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LT_DLLAZY_OR_NOW DL_NOW
-# else
-# define LT_DLLAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-/* When -fvisbility=hidden is used, assume the code has been annotated
- correspondingly for the symbols needed. */
-#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
-int fnord () __attribute__((visibility("default")));
-#endif
-
-int fnord () { return 42; }
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else
- {
- if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- else puts (dlerror ());
- }
- /* dlclose (self); */
- }
- else
- puts (dlerror ());
-
- return status;
-}]
-_LT_EOF
- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
- lt_status=$?
- case x$lt_status in
- x$lt_dlno_uscore) $1 ;;
- x$lt_dlneed_uscore) $2 ;;
- x$lt_dlunknown|x*) $3 ;;
- esac
- else :
- # compilation failed
- $3
- fi
-fi
-rm -fr conftest*
-])# _LT_TRY_DLOPEN_SELF
-
-
-# LT_SYS_DLOPEN_SELF
-# ------------------
-AC_DEFUN([LT_SYS_DLOPEN_SELF],
-[m4_require([_LT_HEADER_DLFCN])dnl
-if test "x$enable_dlopen" != xyes; then
- enable_dlopen=unknown
- enable_dlopen_self=unknown
- enable_dlopen_self_static=unknown
-else
- lt_cv_dlopen=no
- lt_cv_dlopen_libs=
-
- case $host_os in
- beos*)
- lt_cv_dlopen="load_add_on"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ;;
-
- mingw* | pw32* | cegcc*)
- lt_cv_dlopen="LoadLibrary"
- lt_cv_dlopen_libs=
- ;;
-
- cygwin*)
- lt_cv_dlopen="dlopen"
- lt_cv_dlopen_libs=
- ;;
-
- darwin*)
- # if libdl is installed we need to link against it
- AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
- lt_cv_dlopen="dyld"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ])
- ;;
-
- *)
- AC_CHECK_FUNC([shl_load],
- [lt_cv_dlopen="shl_load"],
- [AC_CHECK_LIB([dld], [shl_load],
- [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
- [AC_CHECK_FUNC([dlopen],
- [lt_cv_dlopen="dlopen"],
- [AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
- [AC_CHECK_LIB([svld], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
- [AC_CHECK_LIB([dld], [dld_link],
- [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
- ])
- ])
- ])
- ])
- ])
- ;;
- esac
-
- if test "x$lt_cv_dlopen" != xno; then
- enable_dlopen=yes
- else
- enable_dlopen=no
- fi
-
- case $lt_cv_dlopen in
- dlopen)
- save_CPPFLAGS="$CPPFLAGS"
- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
- save_LDFLAGS="$LDFLAGS"
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
- save_LIBS="$LIBS"
- LIBS="$lt_cv_dlopen_libs $LIBS"
-
- AC_CACHE_CHECK([whether a program can dlopen itself],
- lt_cv_dlopen_self, [dnl
- _LT_TRY_DLOPEN_SELF(
- lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
- lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
- ])
-
- if test "x$lt_cv_dlopen_self" = xyes; then
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
- AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
- lt_cv_dlopen_self_static, [dnl
- _LT_TRY_DLOPEN_SELF(
- lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
- lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
- ])
- fi
-
- CPPFLAGS="$save_CPPFLAGS"
- LDFLAGS="$save_LDFLAGS"
- LIBS="$save_LIBS"
- ;;
- esac
-
- case $lt_cv_dlopen_self in
- yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
- *) enable_dlopen_self=unknown ;;
- esac
-
- case $lt_cv_dlopen_self_static in
- yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
- *) enable_dlopen_self_static=unknown ;;
- esac
-fi
-_LT_DECL([dlopen_support], [enable_dlopen], [0],
- [Whether dlopen is supported])
-_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
- [Whether dlopen of programs is supported])
-_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
- [Whether dlopen of statically linked programs is supported])
-])# LT_SYS_DLOPEN_SELF
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
-
-
-# _LT_COMPILER_C_O([TAGNAME])
-# ---------------------------
-# Check to see if options -c and -o are simultaneously supported by compiler.
-# This macro does not hard code the compiler like AC_PROG_CC_C_O.
-m4_defun([_LT_COMPILER_C_O],
-[m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
- [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
- [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
- $RM -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&AS_MESSAGE_LOG_FD
- echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
- fi
- fi
- chmod u+w . 2>&AS_MESSAGE_LOG_FD
- $RM conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
- $RM out/* && rmdir out
- cd ..
- $RM -r conftest
- $RM conftest*
-])
-_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
- [Does compiler simultaneously support -c and -o options?])
-])# _LT_COMPILER_C_O
-
-
-# _LT_COMPILER_FILE_LOCKS([TAGNAME])
-# ----------------------------------
-# Check to see if we can do hard links to lock some files if needed
-m4_defun([_LT_COMPILER_FILE_LOCKS],
-[m4_require([_LT_ENABLE_LOCK])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-_LT_COMPILER_C_O([$1])
-
-hard_links="nottested"
-if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
- # do not overwrite the value of need_locks provided by the user
- AC_MSG_CHECKING([if we can lock with hard links])
- hard_links=yes
- $RM conftest*
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- touch conftest.a
- ln conftest.a conftest.b 2>&5 || hard_links=no
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- AC_MSG_RESULT([$hard_links])
- if test "$hard_links" = no; then
- AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
- need_locks=warn
- fi
-else
- need_locks=no
-fi
-_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
-])# _LT_COMPILER_FILE_LOCKS
-
-
-# _LT_CHECK_OBJDIR
-# ----------------
-m4_defun([_LT_CHECK_OBJDIR],
-[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
-[rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
- lt_cv_objdir=.libs
-else
- # MS-DOS does not allow filenames that begin with a dot.
- lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null])
-objdir=$lt_cv_objdir
-_LT_DECL([], [objdir], [0],
- [The name of the directory that contains temporary libtool files])dnl
-m4_pattern_allow([LT_OBJDIR])dnl
-AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
- [Define to the sub-directory in which libtool stores uninstalled libraries.])
-])# _LT_CHECK_OBJDIR
-
-
-# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
-# --------------------------------------
-# Check hardcoding attributes.
-m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
-[AC_MSG_CHECKING([how to hardcode library paths into programs])
-_LT_TAGVAR(hardcode_action, $1)=
-if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
- test -n "$_LT_TAGVAR(runpath_var, $1)" ||
- test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
-
- # We can hardcode non-existent directories.
- if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
- # If the only mechanism to avoid hardcoding is shlibpath_var, we
- # have to relink, otherwise we might link with an installed library
- # when we should be linking with a yet-to-be-installed one
- ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
- test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
- # Linking always hardcodes the temporary library directory.
- _LT_TAGVAR(hardcode_action, $1)=relink
- else
- # We can link without hardcoding, and we can hardcode nonexisting dirs.
- _LT_TAGVAR(hardcode_action, $1)=immediate
- fi
-else
- # We cannot hardcode anything, or else we can only hardcode existing
- # directories.
- _LT_TAGVAR(hardcode_action, $1)=unsupported
-fi
-AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
-
-if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
- test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
- # Fast installation is not supported
- enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
- # Fast installation is not necessary
- enable_fast_install=needless
-fi
-_LT_TAGDECL([], [hardcode_action], [0],
- [How to hardcode a shared library path into an executable])
-])# _LT_LINKER_HARDCODE_LIBPATH
-
-
-# _LT_CMD_STRIPLIB
-# ----------------
-m4_defun([_LT_CMD_STRIPLIB],
-[m4_require([_LT_DECL_EGREP])
-striplib=
-old_striplib=
-AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
- test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- AC_MSG_RESULT([yes])
-else
-# FIXME - insert some real tests, host_os isn't really good enough
- case $host_os in
- darwin*)
- if test -n "$STRIP" ; then
- striplib="$STRIP -x"
- old_striplib="$STRIP -S"
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- fi
- ;;
- *)
- AC_MSG_RESULT([no])
- ;;
- esac
-fi
-_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
-_LT_DECL([], [striplib], [1])
-])# _LT_CMD_STRIPLIB
-
-
-# _LT_SYS_DYNAMIC_LINKER([TAG])
-# -----------------------------
-# PORTME Fill in your ld.so characteristics
-m4_defun([_LT_SYS_DYNAMIC_LINKER],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_OBJDUMP])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_CHECK_SHELL_FEATURES])dnl
-AC_MSG_CHECKING([dynamic linker characteristics])
-m4_if([$1],
- [], [
-if test "$GCC" = yes; then
- case $host_os in
- darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
- *) lt_awk_arg="/^libraries:/" ;;
- esac
- case $host_os in
- mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
- *) lt_sed_strip_eq="s,=/,/,g" ;;
- esac
- lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
- case $lt_search_path_spec in
- *\;*)
- # if the path contains ";" then we assume it to be the separator
- # otherwise default to the standard path separator (i.e. ":") - it is
- # assumed that no part of a normal pathname contains ";" but that should
- # okay in the real world where ";" in dirpaths is itself problematic.
- lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
- ;;
- *)
- lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
- ;;
- esac
- # Ok, now we have the path, separated by spaces, we can step through it
- # and add multilib dir if necessary.
- lt_tmp_lt_search_path_spec=
- lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
- for lt_sys_path in $lt_search_path_spec; do
- if test -d "$lt_sys_path/$lt_multi_os_dir"; then
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
- else
- test -d "$lt_sys_path" && \
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
- fi
- done
- lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
-BEGIN {RS=" "; FS="/|\n";} {
- lt_foo="";
- lt_count=0;
- for (lt_i = NF; lt_i > 0; lt_i--) {
- if ($lt_i != "" && $lt_i != ".") {
- if ($lt_i == "..") {
- lt_count++;
- } else {
- if (lt_count == 0) {
- lt_foo="/" $lt_i lt_foo;
- } else {
- lt_count--;
- }
- }
- }
- }
- if (lt_foo != "") { lt_freq[[lt_foo]]++; }
- if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
-}'`
- # AWK program above erroneously prepends '/' to C:/dos/paths
- # for these hosts.
- case $host_os in
- mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
- $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
- esac
- sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi])
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
- version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
- shlibpath_var=LIBPATH
-
- # AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
-
-aix[[4-9]]*)
- version_type=linux # correct to gnu/linux during the next big refactor
- need_lib_prefix=no
- need_version=no
- hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
- # AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- else
- # With GCC up to 2.95.x, collect2 would create an import file
- # for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
- # development snapshots of GCC prior to 3.0.
- case $host_os in
- aix4 | aix4.[[01]] | aix4.[[01]].*)
- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
- echo ' yes '
- echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
- :
- else
- can_build_shared=no
- fi
- ;;
- esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
- # soname into executable. Probably we can add versioning support to
- # collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
- # If using run time linking (on AIX 4.2 or later) use lib<name>.so
- # instead of lib<name>.a to let people know that these are not
- # typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- else
- # We preserve .a as extension for shared libraries through AIX4.2
- # and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
- fi
- shlibpath_var=LIBPATH
- fi
- ;;
-
-amigaos*)
- case $host_cpu in
- powerpc)
- # Since July 2007 AmigaOS4 officially supports .so libraries.
- # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- ;;
- m68k)
- library_names_spec='$libname.ixlibrary $libname.a'
- # Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
- ;;
- esac
- ;;
-
-beos*)
- library_names_spec='${libname}${shared_ext}'
- dynamic_linker="$host_os ld.so"
- shlibpath_var=LIBRARY_PATH
- ;;
-
-bsdi[[45]]*)
- version_type=linux # correct to gnu/linux during the next big refactor
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
- # the default ld.so.conf also contains /usr/contrib/lib and
- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
- # libtool to hard-code these into programs
- ;;
-
-cygwin* | mingw* | pw32* | cegcc*)
- version_type=windows
- shrext_cmds=".dll"
- need_version=no
- need_lib_prefix=no
-
- case $GCC,$cc_basename in
- yes,*)
- # gcc
- library_names_spec='$libname.dll.a'
- # DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $RM \$dlpath'
- shlibpath_overrides_runpath=yes
-
- case $host_os in
- cygwin*)
- # Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-m4_if([$1], [],[
- sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
- ;;
- mingw* | cegcc*)
- # MinGW DLLs use traditional 'lib' prefix
- soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- ;;
- pw32*)
- # pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- ;;
- esac
- dynamic_linker='Win32 ld.exe'
- ;;
-
- *,cl*)
- # Native MSVC
- libname_spec='$name'
- soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- library_names_spec='${libname}.dll.lib'
-
- case $build_os in
- mingw*)
- sys_lib_search_path_spec=
- lt_save_ifs=$IFS
- IFS=';'
- for lt_path in $LIB
- do
- IFS=$lt_save_ifs
- # Let DOS variable expansion print the short 8.3 style file name.
- lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
- sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
- done
- IFS=$lt_save_ifs
- # Convert to MSYS style.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
- ;;
- cygwin*)
- # Convert to unix form, then to dos form, then back to unix form
- # but this time dos style (no spaces!) so that the unix form looks
- # like /cygdrive/c/PROGRA~1:/cygdr...
- sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
- sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
- sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- ;;
- *)
- sys_lib_search_path_spec="$LIB"
- if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
- # It is most probably a Windows format PATH.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- # FIXME: find the short name or the path components, as spaces are
- # common. (e.g. "Program Files" -> "PROGRA~1")
- ;;
- esac
-
- # DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $RM \$dlpath'
- shlibpath_overrides_runpath=yes
- dynamic_linker='Win32 link.exe'
- ;;
-
- *)
- # Assume MSVC wrapper
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
- dynamic_linker='Win32 ld.exe'
- ;;
- esac
- # FIXME: first we should search . and the directory the executable is in
- shlibpath_var=PATH
- ;;
-
-darwin* | rhapsody*)
- dynamic_linker="$host_os dyld"
- version_type=darwin
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-m4_if([$1], [],[
- sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
- ;;
-
-dgux*)
- version_type=linux # correct to gnu/linux during the next big refactor
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-freebsd* | dragonfly*)
- # DragonFly does not have aout. When/if they implement a new
- # versioning mechanism, adjust this.
- if test -x /usr/bin/objformat; then
- objformat=`/usr/bin/objformat`
- else
- case $host_os in
- freebsd[[23]].*) objformat=aout ;;
- *) objformat=elf ;;
- esac
- fi
- version_type=freebsd-$objformat
- case $version_type in
- freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- need_version=no
- need_lib_prefix=no
- ;;
- freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
- need_version=yes
- ;;
- esac
- shlibpath_var=LD_LIBRARY_PATH
- case $host_os in
- freebsd2.*)
- shlibpath_overrides_runpath=yes
- ;;
- freebsd3.[[01]]* | freebsdelf3.[[01]]*)
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
- freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
- *) # from 4.6 on, and DragonFly
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- esac
- ;;
-
-gnu*)
- version_type=linux # correct to gnu/linux during the next big refactor
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-haiku*)
- version_type=linux # correct to gnu/linux during the next big refactor
- need_lib_prefix=no
- need_version=no
- dynamic_linker="$host_os runtime_loader"
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
- hardcode_into_libs=yes
- ;;
-
-hpux9* | hpux10* | hpux11*)
- # Give a soname corresponding to the major version so that dld.sl refuses to
- # link against other versions.
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- case $host_cpu in
- ia64*)
- shrext_cmds='.so'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.so"
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
- else
- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
- fi
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- hppa*64*)
- shrext_cmds='.sl'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- *)
- shrext_cmds='.sl'
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
- esac
- # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
- postinstall_cmds='chmod 555 $lib'
- # or fails outright, so override atomically:
- install_override_mode=555
- ;;
-
-interix[[3-9]]*)
- version_type=linux # correct to gnu/linux during the next big refactor
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $host_os in
- nonstopux*) version_type=nonstopux ;;
- *)
- if test "$lt_cv_prog_gnu_ld" = yes; then
- version_type=linux # correct to gnu/linux during the next big refactor
- else
- version_type=irix
- fi ;;
- esac
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
- cas
<TRUNCATED>
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/snappy-1.1.2/autogen.sh
----------------------------------------------------------------------
diff --git a/c++/libs/snappy-1.1.2/autogen.sh b/c++/libs/snappy-1.1.2/autogen.sh
deleted file mode 100644
index 9d0ebe9..0000000
--- a/c++/libs/snappy-1.1.2/autogen.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#! /bin/sh -e
-rm -rf autom4te.cache
-aclocal -I m4
-autoheader
-libtoolize --copy
-automake --add-missing --copy
-autoconf
[37/51] [partial] orc git commit: ORC-204 Update and use CMake
External Project to build C++ compression libraries.
Posted by om...@apache.org.
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/snappy-1.1.2/snappy-test.h
----------------------------------------------------------------------
diff --git a/c++/libs/snappy-1.1.2/snappy-test.h b/c++/libs/snappy-1.1.2/snappy-test.h
deleted file mode 100644
index 0f18bf1..0000000
--- a/c++/libs/snappy-1.1.2/snappy-test.h
+++ /dev/null
@@ -1,582 +0,0 @@
-// Copyright 2011 Google Inc. All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Various stubs for the unit tests for the open-source version of Snappy.
-
-#ifndef UTIL_SNAPPY_OPENSOURCE_SNAPPY_TEST_H_
-#define UTIL_SNAPPY_OPENSOURCE_SNAPPY_TEST_H_
-
-#include <iostream>
-#include <string>
-
-#include "snappy-stubs-internal.h"
-
-#include <stdio.h>
-#include <stdarg.h>
-
-#ifdef HAVE_SYS_MMAN_H
-#include <sys/mman.h>
-#endif
-
-#ifdef HAVE_SYS_RESOURCE_H
-#include <sys/resource.h>
-#endif
-
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-
-#ifdef HAVE_WINDOWS_H
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#endif
-
-#include <string>
-
-#ifdef HAVE_GTEST
-
-#include <gtest/gtest.h>
-#undef TYPED_TEST
-#define TYPED_TEST TEST
-#define INIT_GTEST(argc, argv) ::testing::InitGoogleTest(argc, *argv)
-
-#else
-
-// Stubs for if the user doesn't have Google Test installed.
-
-#define TEST(test_case, test_subcase) \
- void Test_ ## test_case ## _ ## test_subcase()
-#define INIT_GTEST(argc, argv)
-
-#define TYPED_TEST TEST
-#define EXPECT_EQ CHECK_EQ
-#define EXPECT_NE CHECK_NE
-#define EXPECT_FALSE(cond) CHECK(!(cond))
-
-#endif
-
-#ifdef HAVE_GFLAGS
-
-#include <gflags/gflags.h>
-
-// This is tricky; both gflags and Google Test want to look at the command line
-// arguments. Google Test seems to be the most happy with unknown arguments,
-// though, so we call it first and hope for the best.
-#define InitGoogle(argv0, argc, argv, remove_flags) \
- INIT_GTEST(argc, argv); \
- google::ParseCommandLineFlags(argc, argv, remove_flags);
-
-#else
-
-// If we don't have the gflags package installed, these can only be
-// changed at compile time.
-#define DEFINE_int32(flag_name, default_value, description) \
- static int FLAGS_ ## flag_name = default_value;
-
-#define InitGoogle(argv0, argc, argv, remove_flags) \
- INIT_GTEST(argc, argv)
-
-#endif
-
-#ifdef HAVE_LIBZ
-#include "zlib.h"
-#endif
-
-#ifdef HAVE_LIBLZO2
-#include "lzo/lzo1x.h"
-#endif
-
-#ifdef HAVE_LIBLZF
-extern "C" {
-#include "lzf.h"
-}
-#endif
-
-#ifdef HAVE_LIBFASTLZ
-#include "fastlz.h"
-#endif
-
-#ifdef HAVE_LIBQUICKLZ
-#include "quicklz.h"
-#endif
-
-namespace {
-
-namespace File {
- void Init() { }
-} // namespace File
-
-namespace file {
- int Defaults() { }
-
- class DummyStatus {
- public:
- void CheckSuccess() { }
- };
-
- DummyStatus GetContents(const string& filename, string* data, int unused) {
- FILE* fp = fopen(filename.c_str(), "rb");
- if (fp == NULL) {
- perror(filename.c_str());
- exit(1);
- }
-
- data->clear();
- while (!feof(fp)) {
- char buf[4096];
- size_t ret = fread(buf, 1, 4096, fp);
- if (ret == 0 && ferror(fp)) {
- perror("fread");
- exit(1);
- }
- data->append(string(buf, ret));
- }
-
- fclose(fp);
- }
-
- DummyStatus SetContents(const string& filename,
- const string& str,
- int unused) {
- FILE* fp = fopen(filename.c_str(), "wb");
- if (fp == NULL) {
- perror(filename.c_str());
- exit(1);
- }
-
- int ret = fwrite(str.data(), str.size(), 1, fp);
- if (ret != 1) {
- perror("fwrite");
- exit(1);
- }
-
- fclose(fp);
- }
-} // namespace file
-
-} // namespace
-
-namespace snappy {
-
-#define FLAGS_test_random_seed 301
-typedef string TypeParam;
-
-void Test_CorruptedTest_VerifyCorrupted();
-void Test_Snappy_SimpleTests();
-void Test_Snappy_MaxBlowup();
-void Test_Snappy_RandomData();
-void Test_Snappy_FourByteOffset();
-void Test_SnappyCorruption_TruncatedVarint();
-void Test_SnappyCorruption_UnterminatedVarint();
-void Test_Snappy_ReadPastEndOfBuffer();
-void Test_Snappy_FindMatchLength();
-void Test_Snappy_FindMatchLengthRandom();
-
-string ReadTestDataFile(const string& base, size_t size_limit);
-
-string ReadTestDataFile(const string& base);
-
-// A sprintf() variant that returns a std::string.
-// Not safe for general use due to truncation issues.
-string StringPrintf(const char* format, ...);
-
-// A simple, non-cryptographically-secure random generator.
-class ACMRandom {
- public:
- explicit ACMRandom(uint32 seed) : seed_(seed) {}
-
- int32 Next();
-
- int32 Uniform(int32 n) {
- return Next() % n;
- }
- uint8 Rand8() {
- return static_cast<uint8>((Next() >> 1) & 0x000000ff);
- }
- bool OneIn(int X) { return Uniform(X) == 0; }
-
- // Skewed: pick "base" uniformly from range [0,max_log] and then
- // return "base" random bits. The effect is to pick a number in the
- // range [0,2^max_log-1] with bias towards smaller numbers.
- int32 Skewed(int max_log);
-
- private:
- static const uint32 M = 2147483647L; // 2^31-1
- uint32 seed_;
-};
-
-inline int32 ACMRandom::Next() {
- static const uint64 A = 16807; // bits 14, 8, 7, 5, 2, 1, 0
- // We are computing
- // seed_ = (seed_ * A) % M, where M = 2^31-1
- //
- // seed_ must not be zero or M, or else all subsequent computed values
- // will be zero or M respectively. For all other values, seed_ will end
- // up cycling through every number in [1,M-1]
- uint64 product = seed_ * A;
-
- // Compute (product % M) using the fact that ((x << 31) % M) == x.
- seed_ = (product >> 31) + (product & M);
- // The first reduction may overflow by 1 bit, so we may need to repeat.
- // mod == M is not possible; using > allows the faster sign-bit-based test.
- if (seed_ > M) {
- seed_ -= M;
- }
- return seed_;
-}
-
-inline int32 ACMRandom::Skewed(int max_log) {
- const int32 base = (Next() - 1) % (max_log+1);
- return (Next() - 1) & ((1u << base)-1);
-}
-
-// A wall-time clock. This stub is not super-accurate, nor resistant to the
-// system time changing.
-class CycleTimer {
- public:
- CycleTimer() : real_time_us_(0) {}
-
- void Start() {
-#ifdef WIN32
- QueryPerformanceCounter(&start_);
-#else
- gettimeofday(&start_, NULL);
-#endif
- }
-
- void Stop() {
-#ifdef WIN32
- LARGE_INTEGER stop;
- LARGE_INTEGER frequency;
- QueryPerformanceCounter(&stop);
- QueryPerformanceFrequency(&frequency);
-
- double elapsed = static_cast<double>(stop.QuadPart - start_.QuadPart) /
- frequency.QuadPart;
- real_time_us_ += elapsed * 1e6 + 0.5;
-#else
- struct timeval stop;
- gettimeofday(&stop, NULL);
-
- real_time_us_ += 1000000 * (stop.tv_sec - start_.tv_sec);
- real_time_us_ += (stop.tv_usec - start_.tv_usec);
-#endif
- }
-
- double Get() {
- return real_time_us_ * 1e-6;
- }
-
- private:
- int64 real_time_us_;
-#ifdef WIN32
- LARGE_INTEGER start_;
-#else
- struct timeval start_;
-#endif
-};
-
-// Minimalistic microbenchmark framework.
-
-typedef void (*BenchmarkFunction)(int, int);
-
-class Benchmark {
- public:
- Benchmark(const string& name, BenchmarkFunction function) :
- name_(name), function_(function) {}
-
- Benchmark* DenseRange(int start, int stop) {
- start_ = start;
- stop_ = stop;
- return this;
- }
-
- void Run();
-
- private:
- const string name_;
- const BenchmarkFunction function_;
- int start_, stop_;
-};
-#define BENCHMARK(benchmark_name) \
- Benchmark* Benchmark_ ## benchmark_name = \
- (new Benchmark(#benchmark_name, benchmark_name))
-
-extern Benchmark* Benchmark_BM_UFlat;
-extern Benchmark* Benchmark_BM_UIOVec;
-extern Benchmark* Benchmark_BM_UValidate;
-extern Benchmark* Benchmark_BM_ZFlat;
-
-void ResetBenchmarkTiming();
-void StartBenchmarkTiming();
-void StopBenchmarkTiming();
-void SetBenchmarkLabel(const string& str);
-void SetBenchmarkBytesProcessed(int64 bytes);
-
-#ifdef HAVE_LIBZ
-
-// Object-oriented wrapper around zlib.
-class ZLib {
- public:
- ZLib();
- ~ZLib();
-
- // Wipe a ZLib object to a virgin state. This differs from Reset()
- // in that it also breaks any state.
- void Reinit();
-
- // Call this to make a zlib buffer as good as new. Here's the only
- // case where they differ:
- // CompressChunk(a); CompressChunk(b); CompressChunkDone(); vs
- // CompressChunk(a); Reset(); CompressChunk(b); CompressChunkDone();
- // You'll want to use Reset(), then, when you interrupt a compress
- // (or uncompress) in the middle of a chunk and want to start over.
- void Reset();
-
- // According to the zlib manual, when you Compress, the destination
- // buffer must have size at least src + .1%*src + 12. This function
- // helps you calculate that. Augment this to account for a potential
- // gzip header and footer, plus a few bytes of slack.
- static int MinCompressbufSize(int uncompress_size) {
- return uncompress_size + uncompress_size/1000 + 40;
- }
-
- // Compresses the source buffer into the destination buffer.
- // sourceLen is the byte length of the source buffer.
- // Upon entry, destLen is the total size of the destination buffer,
- // which must be of size at least MinCompressbufSize(sourceLen).
- // Upon exit, destLen is the actual size of the compressed buffer.
- //
- // This function can be used to compress a whole file at once if the
- // input file is mmap'ed.
- //
- // Returns Z_OK if success, Z_MEM_ERROR if there was not
- // enough memory, Z_BUF_ERROR if there was not enough room in the
- // output buffer. Note that if the output buffer is exactly the same
- // size as the compressed result, we still return Z_BUF_ERROR.
- // (check CL#1936076)
- int Compress(Bytef *dest, uLongf *destLen,
- const Bytef *source, uLong sourceLen);
-
- // Uncompresses the source buffer into the destination buffer.
- // The destination buffer must be long enough to hold the entire
- // decompressed contents.
- //
- // Returns Z_OK on success, otherwise, it returns a zlib error code.
- int Uncompress(Bytef *dest, uLongf *destLen,
- const Bytef *source, uLong sourceLen);
-
- // Uncompress data one chunk at a time -- ie you can call this
- // more than once. To get this to work you need to call per-chunk
- // and "done" routines.
- //
- // Returns Z_OK if success, Z_MEM_ERROR if there was not
- // enough memory, Z_BUF_ERROR if there was not enough room in the
- // output buffer.
-
- int UncompressAtMost(Bytef *dest, uLongf *destLen,
- const Bytef *source, uLong *sourceLen);
-
- // Checks gzip footer information, as needed. Mostly this just
- // makes sure the checksums match. Whenever you call this, it
- // will assume the last 8 bytes from the previous UncompressChunk
- // call are the footer. Returns true iff everything looks ok.
- bool UncompressChunkDone();
-
- private:
- int InflateInit(); // sets up the zlib inflate structure
- int DeflateInit(); // sets up the zlib deflate structure
-
- // These init the zlib data structures for compressing/uncompressing
- int CompressInit(Bytef *dest, uLongf *destLen,
- const Bytef *source, uLong *sourceLen);
- int UncompressInit(Bytef *dest, uLongf *destLen,
- const Bytef *source, uLong *sourceLen);
- // Initialization method to be called if we hit an error while
- // uncompressing. On hitting an error, call this method before
- // returning the error.
- void UncompressErrorInit();
-
- // Helper function for Compress
- int CompressChunkOrAll(Bytef *dest, uLongf *destLen,
- const Bytef *source, uLong sourceLen,
- int flush_mode);
- int CompressAtMostOrAll(Bytef *dest, uLongf *destLen,
- const Bytef *source, uLong *sourceLen,
- int flush_mode);
-
- // Likewise for UncompressAndUncompressChunk
- int UncompressChunkOrAll(Bytef *dest, uLongf *destLen,
- const Bytef *source, uLong sourceLen,
- int flush_mode);
-
- int UncompressAtMostOrAll(Bytef *dest, uLongf *destLen,
- const Bytef *source, uLong *sourceLen,
- int flush_mode);
-
- // Initialization method to be called if we hit an error while
- // compressing. On hitting an error, call this method before
- // returning the error.
- void CompressErrorInit();
-
- int compression_level_; // compression level
- int window_bits_; // log base 2 of the window size used in compression
- int mem_level_; // specifies the amount of memory to be used by
- // compressor (1-9)
- z_stream comp_stream_; // Zlib stream data structure
- bool comp_init_; // True if we have initialized comp_stream_
- z_stream uncomp_stream_; // Zlib stream data structure
- bool uncomp_init_; // True if we have initialized uncomp_stream_
-
- // These are used only with chunked compression.
- bool first_chunk_; // true if we need to emit headers with this chunk
-};
-
-#endif // HAVE_LIBZ
-
-} // namespace snappy
-
-DECLARE_bool(run_microbenchmarks);
-
-static void RunSpecifiedBenchmarks() {
- if (!FLAGS_run_microbenchmarks) {
- return;
- }
-
- fprintf(stderr, "Running microbenchmarks.\n");
-#ifndef NDEBUG
- fprintf(stderr, "WARNING: Compiled with assertions enabled, will be slow.\n");
-#endif
-#ifndef __OPTIMIZE__
- fprintf(stderr, "WARNING: Compiled without optimization, will be slow.\n");
-#endif
- fprintf(stderr, "Benchmark Time(ns) CPU(ns) Iterations\n");
- fprintf(stderr, "---------------------------------------------------\n");
-
- snappy::Benchmark_BM_UFlat->Run();
- snappy::Benchmark_BM_UIOVec->Run();
- snappy::Benchmark_BM_UValidate->Run();
- snappy::Benchmark_BM_ZFlat->Run();
-
- fprintf(stderr, "\n");
-}
-
-#ifndef HAVE_GTEST
-
-static inline int RUN_ALL_TESTS() {
- fprintf(stderr, "Running correctness tests.\n");
- snappy::Test_CorruptedTest_VerifyCorrupted();
- snappy::Test_Snappy_SimpleTests();
- snappy::Test_Snappy_MaxBlowup();
- snappy::Test_Snappy_RandomData();
- snappy::Test_Snappy_FourByteOffset();
- snappy::Test_SnappyCorruption_TruncatedVarint();
- snappy::Test_SnappyCorruption_UnterminatedVarint();
- snappy::Test_Snappy_ReadPastEndOfBuffer();
- snappy::Test_Snappy_FindMatchLength();
- snappy::Test_Snappy_FindMatchLengthRandom();
- fprintf(stderr, "All tests passed.\n");
-
- return 0;
-}
-
-#endif // HAVE_GTEST
-
-// For main().
-namespace snappy {
-
-static void CompressFile(const char* fname);
-static void UncompressFile(const char* fname);
-static void MeasureFile(const char* fname);
-
-// Logging.
-
-#define LOG(level) LogMessage()
-#define VLOG(level) true ? (void)0 : \
- snappy::LogMessageVoidify() & snappy::LogMessage()
-
-class LogMessage {
- public:
- LogMessage() { }
- ~LogMessage() {
- cerr << endl;
- }
-
- LogMessage& operator<<(const std::string& msg) {
- cerr << msg;
- return *this;
- }
- LogMessage& operator<<(int x) {
- cerr << x;
- return *this;
- }
-};
-
-// Asserts, both versions activated in debug mode only,
-// and ones that are always active.
-
-#define CRASH_UNLESS(condition) \
- PREDICT_TRUE(condition) ? (void)0 : \
- snappy::LogMessageVoidify() & snappy::LogMessageCrash()
-
-class LogMessageCrash : public LogMessage {
- public:
- LogMessageCrash() { }
- ~LogMessageCrash() {
- cerr << endl;
- abort();
- }
-};
-
-// This class is used to explicitly ignore values in the conditional
-// logging macros. This avoids compiler warnings like "value computed
-// is not used" and "statement has no effect".
-
-class LogMessageVoidify {
- public:
- LogMessageVoidify() { }
- // This has to be an operator with a precedence lower than << but
- // higher than ?:
- void operator&(const LogMessage&) { }
-};
-
-#define CHECK(cond) CRASH_UNLESS(cond)
-#define CHECK_LE(a, b) CRASH_UNLESS((a) <= (b))
-#define CHECK_GE(a, b) CRASH_UNLESS((a) >= (b))
-#define CHECK_EQ(a, b) CRASH_UNLESS((a) == (b))
-#define CHECK_NE(a, b) CRASH_UNLESS((a) != (b))
-#define CHECK_LT(a, b) CRASH_UNLESS((a) < (b))
-#define CHECK_GT(a, b) CRASH_UNLESS((a) > (b))
-
-} // namespace
-
-using snappy::CompressFile;
-using snappy::UncompressFile;
-using snappy::MeasureFile;
-
-#endif // UTIL_SNAPPY_OPENSOURCE_SNAPPY_TEST_H_
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/snappy-1.1.2/snappy.cc
----------------------------------------------------------------------
diff --git a/c++/libs/snappy-1.1.2/snappy.cc b/c++/libs/snappy-1.1.2/snappy.cc
deleted file mode 100644
index f8d0d23..0000000
--- a/c++/libs/snappy-1.1.2/snappy.cc
+++ /dev/null
@@ -1,1306 +0,0 @@
-// Copyright 2005 Google Inc. All Rights Reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#include "snappy.h"
-#include "snappy-internal.h"
-#include "snappy-sinksource.h"
-
-#include <stdio.h>
-
-#include <algorithm>
-#include <string>
-#include <vector>
-
-
-namespace snappy {
-
-// Any hash function will produce a valid compressed bitstream, but a good
-// hash function reduces the number of collisions and thus yields better
-// compression for compressible input, and more speed for incompressible
-// input. Of course, it doesn't hurt if the hash function is reasonably fast
-// either, as it gets called a lot.
-static inline uint32 HashBytes(uint32 bytes, int shift) {
- uint32 kMul = 0x1e35a7bd;
- return (bytes * kMul) >> shift;
-}
-static inline uint32 Hash(const char* p, int shift) {
- return HashBytes(UNALIGNED_LOAD32(p), shift);
-}
-
-size_t MaxCompressedLength(size_t source_len) {
- // Compressed data can be defined as:
- // compressed := item* literal*
- // item := literal* copy
- //
- // The trailing literal sequence has a space blowup of at most 62/60
- // since a literal of length 60 needs one tag byte + one extra byte
- // for length information.
- //
- // Item blowup is trickier to measure. Suppose the "copy" op copies
- // 4 bytes of data. Because of a special check in the encoding code,
- // we produce a 4-byte copy only if the offset is < 65536. Therefore
- // the copy op takes 3 bytes to encode, and this type of item leads
- // to at most the 62/60 blowup for representing literals.
- //
- // Suppose the "copy" op copies 5 bytes of data. If the offset is big
- // enough, it will take 5 bytes to encode the copy op. Therefore the
- // worst case here is a one-byte literal followed by a five-byte copy.
- // I.e., 6 bytes of input turn into 7 bytes of "compressed" data.
- //
- // This last factor dominates the blowup, so the final estimate is:
- return 32 + source_len + source_len/6;
-}
-
-enum {
- LITERAL = 0,
- COPY_1_BYTE_OFFSET = 1, // 3 bit length + 3 bits of offset in opcode
- COPY_2_BYTE_OFFSET = 2,
- COPY_4_BYTE_OFFSET = 3
-};
-static const int kMaximumTagLength = 5; // COPY_4_BYTE_OFFSET plus the actual offset.
-
-// Copy "len" bytes from "src" to "op", one byte at a time. Used for
-// handling COPY operations where the input and output regions may
-// overlap. For example, suppose:
-// src == "ab"
-// op == src + 2
-// len == 20
-// After IncrementalCopy(src, op, len), the result will have
-// eleven copies of "ab"
-// ababababababababababab
-// Note that this does not match the semantics of either memcpy()
-// or memmove().
-static inline void IncrementalCopy(const char* src, char* op, ssize_t len) {
- assert(len > 0);
- do {
- *op++ = *src++;
- } while (--len > 0);
-}
-
-// Equivalent to IncrementalCopy except that it can write up to ten extra
-// bytes after the end of the copy, and that it is faster.
-//
-// The main part of this loop is a simple copy of eight bytes at a time until
-// we've copied (at least) the requested amount of bytes. However, if op and
-// src are less than eight bytes apart (indicating a repeating pattern of
-// length < 8), we first need to expand the pattern in order to get the correct
-// results. For instance, if the buffer looks like this, with the eight-byte
-// <src> and <op> patterns marked as intervals:
-//
-// abxxxxxxxxxxxx
-// [------] src
-// [------] op
-//
-// a single eight-byte copy from <src> to <op> will repeat the pattern once,
-// after which we can move <op> two bytes without moving <src>:
-//
-// ababxxxxxxxxxx
-// [------] src
-// [------] op
-//
-// and repeat the exercise until the two no longer overlap.
-//
-// This allows us to do very well in the special case of one single byte
-// repeated many times, without taking a big hit for more general cases.
-//
-// The worst case of extra writing past the end of the match occurs when
-// op - src == 1 and len == 1; the last copy will read from byte positions
-// [0..7] and write to [4..11], whereas it was only supposed to write to
-// position 1. Thus, ten excess bytes.
-
-namespace {
-
-const int kMaxIncrementCopyOverflow = 10;
-
-inline void IncrementalCopyFastPath(const char* src, char* op, ssize_t len) {
- while (op - src < 8) {
- UnalignedCopy64(src, op);
- len -= op - src;
- op += op - src;
- }
- while (len > 0) {
- UnalignedCopy64(src, op);
- src += 8;
- op += 8;
- len -= 8;
- }
-}
-
-} // namespace
-
-static inline char* EmitLiteral(char* op,
- const char* literal,
- int len,
- bool allow_fast_path) {
- int n = len - 1; // Zero-length literals are disallowed
- if (n < 60) {
- // Fits in tag byte
- *op++ = LITERAL | (n << 2);
-
- // The vast majority of copies are below 16 bytes, for which a
- // call to memcpy is overkill. This fast path can sometimes
- // copy up to 15 bytes too much, but that is okay in the
- // main loop, since we have a bit to go on for both sides:
- //
- // - The input will always have kInputMarginBytes = 15 extra
- // available bytes, as long as we're in the main loop, and
- // if not, allow_fast_path = false.
- // - The output will always have 32 spare bytes (see
- // MaxCompressedLength).
- if (allow_fast_path && len <= 16) {
- UnalignedCopy64(literal, op);
- UnalignedCopy64(literal + 8, op + 8);
- return op + len;
- }
- } else {
- // Encode in upcoming bytes
- char* base = op;
- int count = 0;
- op++;
- while (n > 0) {
- *op++ = n & 0xff;
- n >>= 8;
- count++;
- }
- assert(count >= 1);
- assert(count <= 4);
- *base = LITERAL | ((59+count) << 2);
- }
- memcpy(op, literal, len);
- return op + len;
-}
-
-static inline char* EmitCopyLessThan64(char* op, size_t offset, int len) {
- assert(len <= 64);
- assert(len >= 4);
- assert(offset < 65536);
-
- if ((len < 12) && (offset < 2048)) {
- size_t len_minus_4 = len - 4;
- assert(len_minus_4 < 8); // Must fit in 3 bits
- *op++ = COPY_1_BYTE_OFFSET + ((len_minus_4) << 2) + ((offset >> 8) << 5);
- *op++ = offset & 0xff;
- } else {
- *op++ = COPY_2_BYTE_OFFSET + ((len-1) << 2);
- LittleEndian::Store16(op, offset);
- op += 2;
- }
- return op;
-}
-
-static inline char* EmitCopy(char* op, size_t offset, int len) {
- // Emit 64 byte copies but make sure to keep at least four bytes reserved
- while (len >= 68) {
- op = EmitCopyLessThan64(op, offset, 64);
- len -= 64;
- }
-
- // Emit an extra 60 byte copy if have too much data to fit in one copy
- if (len > 64) {
- op = EmitCopyLessThan64(op, offset, 60);
- len -= 60;
- }
-
- // Emit remainder
- op = EmitCopyLessThan64(op, offset, len);
- return op;
-}
-
-
-bool GetUncompressedLength(const char* start, size_t n, size_t* result) {
- uint32 v = 0;
- const char* limit = start + n;
- if (Varint::Parse32WithLimit(start, limit, &v) != NULL) {
- *result = v;
- return true;
- } else {
- return false;
- }
-}
-
-namespace internal {
-uint16* WorkingMemory::GetHashTable(size_t input_size, int* table_size) {
- // Use smaller hash table when input.size() is smaller, since we
- // fill the table, incurring O(hash table size) overhead for
- // compression, and if the input is short, we won't need that
- // many hash table entries anyway.
- assert(kMaxHashTableSize >= 256);
- size_t htsize = 256;
- while (htsize < kMaxHashTableSize && htsize < input_size) {
- htsize <<= 1;
- }
-
- uint16* table;
- if (htsize <= ARRAYSIZE(small_table_)) {
- table = small_table_;
- } else {
- if (large_table_ == NULL) {
- large_table_ = new uint16[kMaxHashTableSize];
- }
- table = large_table_;
- }
-
- *table_size = htsize;
- memset(table, 0, htsize * sizeof(*table));
- return table;
-}
-} // end namespace internal
-
-// For 0 <= offset <= 4, GetUint32AtOffset(GetEightBytesAt(p), offset) will
-// equal UNALIGNED_LOAD32(p + offset). Motivation: On x86-64 hardware we have
-// empirically found that overlapping loads such as
-// UNALIGNED_LOAD32(p) ... UNALIGNED_LOAD32(p+1) ... UNALIGNED_LOAD32(p+2)
-// are slower than UNALIGNED_LOAD64(p) followed by shifts and casts to uint32.
-//
-// We have different versions for 64- and 32-bit; ideally we would avoid the
-// two functions and just inline the UNALIGNED_LOAD64 call into
-// GetUint32AtOffset, but GCC (at least not as of 4.6) is seemingly not clever
-// enough to avoid loading the value multiple times then. For 64-bit, the load
-// is done when GetEightBytesAt() is called, whereas for 32-bit, the load is
-// done at GetUint32AtOffset() time.
-
-#ifdef ARCH_K8
-
-typedef uint64 EightBytesReference;
-
-static inline EightBytesReference GetEightBytesAt(const char* ptr) {
- return UNALIGNED_LOAD64(ptr);
-}
-
-static inline uint32 GetUint32AtOffset(uint64 v, int offset) {
- assert(offset >= 0);
- assert(offset <= 4);
- return v >> (LittleEndian::IsLittleEndian() ? 8 * offset : 32 - 8 * offset);
-}
-
-#else
-
-typedef const char* EightBytesReference;
-
-static inline EightBytesReference GetEightBytesAt(const char* ptr) {
- return ptr;
-}
-
-static inline uint32 GetUint32AtOffset(const char* v, int offset) {
- assert(offset >= 0);
- assert(offset <= 4);
- return UNALIGNED_LOAD32(v + offset);
-}
-
-#endif
-
-// Flat array compression that does not emit the "uncompressed length"
-// prefix. Compresses "input" string to the "*op" buffer.
-//
-// REQUIRES: "input" is at most "kBlockSize" bytes long.
-// REQUIRES: "op" points to an array of memory that is at least
-// "MaxCompressedLength(input.size())" in size.
-// REQUIRES: All elements in "table[0..table_size-1]" are initialized to zero.
-// REQUIRES: "table_size" is a power of two
-//
-// Returns an "end" pointer into "op" buffer.
-// "end - op" is the compressed size of "input".
-namespace internal {
-char* CompressFragment(const char* input,
- size_t input_size,
- char* op,
- uint16* table,
- const int table_size) {
- // "ip" is the input pointer, and "op" is the output pointer.
- const char* ip = input;
- assert(input_size <= kBlockSize);
- assert((table_size & (table_size - 1)) == 0); // table must be power of two
- const int shift = 32 - Bits::Log2Floor(table_size);
- assert(static_cast<int>(kuint32max >> shift) == table_size - 1);
- const char* ip_end = input + input_size;
- const char* base_ip = ip;
- // Bytes in [next_emit, ip) will be emitted as literal bytes. Or
- // [next_emit, ip_end) after the main loop.
- const char* next_emit = ip;
-
- const size_t kInputMarginBytes = 15;
- if (PREDICT_TRUE(input_size >= kInputMarginBytes)) {
- const char* ip_limit = input + input_size - kInputMarginBytes;
-
- for (uint32 next_hash = Hash(++ip, shift); ; ) {
- assert(next_emit < ip);
- // The body of this loop calls EmitLiteral once and then EmitCopy one or
- // more times. (The exception is that when we're close to exhausting
- // the input we goto emit_remainder.)
- //
- // In the first iteration of this loop we're just starting, so
- // there's nothing to copy, so calling EmitLiteral once is
- // necessary. And we only start a new iteration when the
- // current iteration has determined that a call to EmitLiteral will
- // precede the next call to EmitCopy (if any).
- //
- // Step 1: Scan forward in the input looking for a 4-byte-long match.
- // If we get close to exhausting the input then goto emit_remainder.
- //
- // Heuristic match skipping: If 32 bytes are scanned with no matches
- // found, start looking only at every other byte. If 32 more bytes are
- // scanned, look at every third byte, etc.. When a match is found,
- // immediately go back to looking at every byte. This is a small loss
- // (~5% performance, ~0.1% density) for compressible data due to more
- // bookkeeping, but for non-compressible data (such as JPEG) it's a huge
- // win since the compressor quickly "realizes" the data is incompressible
- // and doesn't bother looking for matches everywhere.
- //
- // The "skip" variable keeps track of how many bytes there are since the
- // last match; dividing it by 32 (ie. right-shifting by five) gives the
- // number of bytes to move ahead for each iteration.
- uint32 skip = 32;
-
- const char* next_ip = ip;
- const char* candidate;
- do {
- ip = next_ip;
- uint32 hash = next_hash;
- assert(hash == Hash(ip, shift));
- uint32 bytes_between_hash_lookups = skip++ >> 5;
- next_ip = ip + bytes_between_hash_lookups;
- if (PREDICT_FALSE(next_ip > ip_limit)) {
- goto emit_remainder;
- }
- next_hash = Hash(next_ip, shift);
- candidate = base_ip + table[hash];
- assert(candidate >= base_ip);
- assert(candidate < ip);
-
- table[hash] = ip - base_ip;
- } while (PREDICT_TRUE(UNALIGNED_LOAD32(ip) !=
- UNALIGNED_LOAD32(candidate)));
-
- // Step 2: A 4-byte match has been found. We'll later see if more
- // than 4 bytes match. But, prior to the match, input
- // bytes [next_emit, ip) are unmatched. Emit them as "literal bytes."
- assert(next_emit + 16 <= ip_end);
- op = EmitLiteral(op, next_emit, ip - next_emit, true);
-
- // Step 3: Call EmitCopy, and then see if another EmitCopy could
- // be our next move. Repeat until we find no match for the
- // input immediately after what was consumed by the last EmitCopy call.
- //
- // If we exit this loop normally then we need to call EmitLiteral next,
- // though we don't yet know how big the literal will be. We handle that
- // by proceeding to the next iteration of the main loop. We also can exit
- // this loop via goto if we get close to exhausting the input.
- EightBytesReference input_bytes;
- uint32 candidate_bytes = 0;
-
- do {
- // We have a 4-byte match at ip, and no need to emit any
- // "literal bytes" prior to ip.
- const char* base = ip;
- int matched = 4 + FindMatchLength(candidate + 4, ip + 4, ip_end);
- ip += matched;
- size_t offset = base - candidate;
- assert(0 == memcmp(base, candidate, matched));
- op = EmitCopy(op, offset, matched);
- // We could immediately start working at ip now, but to improve
- // compression we first update table[Hash(ip - 1, ...)].
- const char* insert_tail = ip - 1;
- next_emit = ip;
- if (PREDICT_FALSE(ip >= ip_limit)) {
- goto emit_remainder;
- }
- input_bytes = GetEightBytesAt(insert_tail);
- uint32 prev_hash = HashBytes(GetUint32AtOffset(input_bytes, 0), shift);
- table[prev_hash] = ip - base_ip - 1;
- uint32 cur_hash = HashBytes(GetUint32AtOffset(input_bytes, 1), shift);
- candidate = base_ip + table[cur_hash];
- candidate_bytes = UNALIGNED_LOAD32(candidate);
- table[cur_hash] = ip - base_ip;
- } while (GetUint32AtOffset(input_bytes, 1) == candidate_bytes);
-
- next_hash = HashBytes(GetUint32AtOffset(input_bytes, 2), shift);
- ++ip;
- }
- }
-
- emit_remainder:
- // Emit the remaining bytes as a literal
- if (next_emit < ip_end) {
- op = EmitLiteral(op, next_emit, ip_end - next_emit, false);
- }
-
- return op;
-}
-} // end namespace internal
-
-// Signature of output types needed by decompression code.
-// The decompression code is templatized on a type that obeys this
-// signature so that we do not pay virtual function call overhead in
-// the middle of a tight decompression loop.
-//
-// class DecompressionWriter {
-// public:
-// // Called before decompression
-// void SetExpectedLength(size_t length);
-//
-// // Called after decompression
-// bool CheckLength() const;
-//
-// // Called repeatedly during decompression
-// bool Append(const char* ip, size_t length);
-// bool AppendFromSelf(uint32 offset, size_t length);
-//
-// // The rules for how TryFastAppend differs from Append are somewhat
-// // convoluted:
-// //
-// // - TryFastAppend is allowed to decline (return false) at any
-// // time, for any reason -- just "return false" would be
-// // a perfectly legal implementation of TryFastAppend.
-// // The intention is for TryFastAppend to allow a fast path
-// // in the common case of a small append.
-// // - TryFastAppend is allowed to read up to <available> bytes
-// // from the input buffer, whereas Append is allowed to read
-// // <length>. However, if it returns true, it must leave
-// // at least five (kMaximumTagLength) bytes in the input buffer
-// // afterwards, so that there is always enough space to read the
-// // next tag without checking for a refill.
-// // - TryFastAppend must always return decline (return false)
-// // if <length> is 61 or more, as in this case the literal length is not
-// // decoded fully. In practice, this should not be a big problem,
-// // as it is unlikely that one would implement a fast path accepting
-// // this much data.
-// //
-// bool TryFastAppend(const char* ip, size_t available, size_t length);
-// };
-
-// -----------------------------------------------------------------------
-// Lookup table for decompression code. Generated by ComputeTable() below.
-// -----------------------------------------------------------------------
-
-// Mapping from i in range [0,4] to a mask to extract the bottom 8*i bits
-static const uint32 wordmask[] = {
- 0u, 0xffu, 0xffffu, 0xffffffu, 0xffffffffu
-};
-
-// Data stored per entry in lookup table:
-// Range Bits-used Description
-// ------------------------------------
-// 1..64 0..7 Literal/copy length encoded in opcode byte
-// 0..7 8..10 Copy offset encoded in opcode byte / 256
-// 0..4 11..13 Extra bytes after opcode
-//
-// We use eight bits for the length even though 7 would have sufficed
-// because of efficiency reasons:
-// (1) Extracting a byte is faster than a bit-field
-// (2) It properly aligns copy offset so we do not need a <<8
-static const uint16 char_table[256] = {
- 0x0001, 0x0804, 0x1001, 0x2001, 0x0002, 0x0805, 0x1002, 0x2002,
- 0x0003, 0x0806, 0x1003, 0x2003, 0x0004, 0x0807, 0x1004, 0x2004,
- 0x0005, 0x0808, 0x1005, 0x2005, 0x0006, 0x0809, 0x1006, 0x2006,
- 0x0007, 0x080a, 0x1007, 0x2007, 0x0008, 0x080b, 0x1008, 0x2008,
- 0x0009, 0x0904, 0x1009, 0x2009, 0x000a, 0x0905, 0x100a, 0x200a,
- 0x000b, 0x0906, 0x100b, 0x200b, 0x000c, 0x0907, 0x100c, 0x200c,
- 0x000d, 0x0908, 0x100d, 0x200d, 0x000e, 0x0909, 0x100e, 0x200e,
- 0x000f, 0x090a, 0x100f, 0x200f, 0x0010, 0x090b, 0x1010, 0x2010,
- 0x0011, 0x0a04, 0x1011, 0x2011, 0x0012, 0x0a05, 0x1012, 0x2012,
- 0x0013, 0x0a06, 0x1013, 0x2013, 0x0014, 0x0a07, 0x1014, 0x2014,
- 0x0015, 0x0a08, 0x1015, 0x2015, 0x0016, 0x0a09, 0x1016, 0x2016,
- 0x0017, 0x0a0a, 0x1017, 0x2017, 0x0018, 0x0a0b, 0x1018, 0x2018,
- 0x0019, 0x0b04, 0x1019, 0x2019, 0x001a, 0x0b05, 0x101a, 0x201a,
- 0x001b, 0x0b06, 0x101b, 0x201b, 0x001c, 0x0b07, 0x101c, 0x201c,
- 0x001d, 0x0b08, 0x101d, 0x201d, 0x001e, 0x0b09, 0x101e, 0x201e,
- 0x001f, 0x0b0a, 0x101f, 0x201f, 0x0020, 0x0b0b, 0x1020, 0x2020,
- 0x0021, 0x0c04, 0x1021, 0x2021, 0x0022, 0x0c05, 0x1022, 0x2022,
- 0x0023, 0x0c06, 0x1023, 0x2023, 0x0024, 0x0c07, 0x1024, 0x2024,
- 0x0025, 0x0c08, 0x1025, 0x2025, 0x0026, 0x0c09, 0x1026, 0x2026,
- 0x0027, 0x0c0a, 0x1027, 0x2027, 0x0028, 0x0c0b, 0x1028, 0x2028,
- 0x0029, 0x0d04, 0x1029, 0x2029, 0x002a, 0x0d05, 0x102a, 0x202a,
- 0x002b, 0x0d06, 0x102b, 0x202b, 0x002c, 0x0d07, 0x102c, 0x202c,
- 0x002d, 0x0d08, 0x102d, 0x202d, 0x002e, 0x0d09, 0x102e, 0x202e,
- 0x002f, 0x0d0a, 0x102f, 0x202f, 0x0030, 0x0d0b, 0x1030, 0x2030,
- 0x0031, 0x0e04, 0x1031, 0x2031, 0x0032, 0x0e05, 0x1032, 0x2032,
- 0x0033, 0x0e06, 0x1033, 0x2033, 0x0034, 0x0e07, 0x1034, 0x2034,
- 0x0035, 0x0e08, 0x1035, 0x2035, 0x0036, 0x0e09, 0x1036, 0x2036,
- 0x0037, 0x0e0a, 0x1037, 0x2037, 0x0038, 0x0e0b, 0x1038, 0x2038,
- 0x0039, 0x0f04, 0x1039, 0x2039, 0x003a, 0x0f05, 0x103a, 0x203a,
- 0x003b, 0x0f06, 0x103b, 0x203b, 0x003c, 0x0f07, 0x103c, 0x203c,
- 0x0801, 0x0f08, 0x103d, 0x203d, 0x1001, 0x0f09, 0x103e, 0x203e,
- 0x1801, 0x0f0a, 0x103f, 0x203f, 0x2001, 0x0f0b, 0x1040, 0x2040
-};
-
-// In debug mode, allow optional computation of the table at startup.
-// Also, check that the decompression table is correct.
-#ifndef NDEBUG
-DEFINE_bool(snappy_dump_decompression_table, false,
- "If true, we print the decompression table at startup.");
-
-static uint16 MakeEntry(unsigned int extra,
- unsigned int len,
- unsigned int copy_offset) {
- // Check that all of the fields fit within the allocated space
- assert(extra == (extra & 0x7)); // At most 3 bits
- assert(copy_offset == (copy_offset & 0x7)); // At most 3 bits
- assert(len == (len & 0x7f)); // At most 7 bits
- return len | (copy_offset << 8) | (extra << 11);
-}
-
-static void ComputeTable() {
- uint16 dst[256];
-
- // Place invalid entries in all places to detect missing initialization
- int assigned = 0;
- for (int i = 0; i < 256; i++) {
- dst[i] = 0xffff;
- }
-
- // Small LITERAL entries. We store (len-1) in the top 6 bits.
- for (unsigned int len = 1; len <= 60; len++) {
- dst[LITERAL | ((len-1) << 2)] = MakeEntry(0, len, 0);
- assigned++;
- }
-
- // Large LITERAL entries. We use 60..63 in the high 6 bits to
- // encode the number of bytes of length info that follow the opcode.
- for (unsigned int extra_bytes = 1; extra_bytes <= 4; extra_bytes++) {
- // We set the length field in the lookup table to 1 because extra
- // bytes encode len-1.
- dst[LITERAL | ((extra_bytes+59) << 2)] = MakeEntry(extra_bytes, 1, 0);
- assigned++;
- }
-
- // COPY_1_BYTE_OFFSET.
- //
- // The tag byte in the compressed data stores len-4 in 3 bits, and
- // offset/256 in 5 bits. offset%256 is stored in the next byte.
- //
- // This format is used for length in range [4..11] and offset in
- // range [0..2047]
- for (unsigned int len = 4; len < 12; len++) {
- for (unsigned int offset = 0; offset < 2048; offset += 256) {
- dst[COPY_1_BYTE_OFFSET | ((len-4)<<2) | ((offset>>8)<<5)] =
- MakeEntry(1, len, offset>>8);
- assigned++;
- }
- }
-
- // COPY_2_BYTE_OFFSET.
- // Tag contains len-1 in top 6 bits, and offset in next two bytes.
- for (unsigned int len = 1; len <= 64; len++) {
- dst[COPY_2_BYTE_OFFSET | ((len-1)<<2)] = MakeEntry(2, len, 0);
- assigned++;
- }
-
- // COPY_4_BYTE_OFFSET.
- // Tag contents len-1 in top 6 bits, and offset in next four bytes.
- for (unsigned int len = 1; len <= 64; len++) {
- dst[COPY_4_BYTE_OFFSET | ((len-1)<<2)] = MakeEntry(4, len, 0);
- assigned++;
- }
-
- // Check that each entry was initialized exactly once.
- if (assigned != 256) {
- fprintf(stderr, "ComputeTable: assigned only %d of 256\n", assigned);
- abort();
- }
- for (int i = 0; i < 256; i++) {
- if (dst[i] == 0xffff) {
- fprintf(stderr, "ComputeTable: did not assign byte %d\n", i);
- abort();
- }
- }
-
- if (FLAGS_snappy_dump_decompression_table) {
- printf("static const uint16 char_table[256] = {\n ");
- for (int i = 0; i < 256; i++) {
- printf("0x%04x%s",
- dst[i],
- ((i == 255) ? "\n" : (((i%8) == 7) ? ",\n " : ", ")));
- }
- printf("};\n");
- }
-
- // Check that computed table matched recorded table
- for (int i = 0; i < 256; i++) {
- if (dst[i] != char_table[i]) {
- fprintf(stderr, "ComputeTable: byte %d: computed (%x), expect (%x)\n",
- i, static_cast<int>(dst[i]), static_cast<int>(char_table[i]));
- abort();
- }
- }
-}
-#endif /* !NDEBUG */
-
-// Helper class for decompression
-class SnappyDecompressor {
- private:
- Source* reader_; // Underlying source of bytes to decompress
- const char* ip_; // Points to next buffered byte
- const char* ip_limit_; // Points just past buffered bytes
- uint32 peeked_; // Bytes peeked from reader (need to skip)
- bool eof_; // Hit end of input without an error?
- char scratch_[kMaximumTagLength]; // See RefillTag().
-
- // Ensure that all of the tag metadata for the next tag is available
- // in [ip_..ip_limit_-1]. Also ensures that [ip,ip+4] is readable even
- // if (ip_limit_ - ip_ < 5).
- //
- // Returns true on success, false on error or end of input.
- bool RefillTag();
-
- public:
- explicit SnappyDecompressor(Source* reader)
- : reader_(reader),
- ip_(NULL),
- ip_limit_(NULL),
- peeked_(0),
- eof_(false) {
- }
-
- ~SnappyDecompressor() {
- // Advance past any bytes we peeked at from the reader
- reader_->Skip(peeked_);
- }
-
- // Returns true iff we have hit the end of the input without an error.
- bool eof() const {
- return eof_;
- }
-
- // Read the uncompressed length stored at the start of the compressed data.
- // On succcess, stores the length in *result and returns true.
- // On failure, returns false.
- bool ReadUncompressedLength(uint32* result) {
- assert(ip_ == NULL); // Must not have read anything yet
- // Length is encoded in 1..5 bytes
- *result = 0;
- uint32 shift = 0;
- while (true) {
- if (shift >= 32) return false;
- size_t n;
- const char* ip = reader_->Peek(&n);
- if (n == 0) return false;
- const unsigned char c = *(reinterpret_cast<const unsigned char*>(ip));
- reader_->Skip(1);
- *result |= static_cast<uint32>(c & 0x7f) << shift;
- if (c < 128) {
- break;
- }
- shift += 7;
- }
- return true;
- }
-
- // Process the next item found in the input.
- // Returns true if successful, false on error or end of input.
- template <class Writer>
- void DecompressAllTags(Writer* writer) {
- const char* ip = ip_;
-
- // We could have put this refill fragment only at the beginning of the loop.
- // However, duplicating it at the end of each branch gives the compiler more
- // scope to optimize the <ip_limit_ - ip> expression based on the local
- // context, which overall increases speed.
- #define MAYBE_REFILL() \
- if (ip_limit_ - ip < kMaximumTagLength) { \
- ip_ = ip; \
- if (!RefillTag()) return; \
- ip = ip_; \
- }
-
- MAYBE_REFILL();
- for ( ;; ) {
- const unsigned char c = *(reinterpret_cast<const unsigned char*>(ip++));
-
- if ((c & 0x3) == LITERAL) {
- size_t literal_length = (c >> 2) + 1u;
- if (writer->TryFastAppend(ip, ip_limit_ - ip, literal_length)) {
- assert(literal_length < 61);
- ip += literal_length;
- // NOTE(user): There is no MAYBE_REFILL() here, as TryFastAppend()
- // will not return true unless there's already at least five spare
- // bytes in addition to the literal.
- continue;
- }
- if (PREDICT_FALSE(literal_length >= 61)) {
- // Long literal.
- const size_t literal_length_length = literal_length - 60;
- literal_length =
- (LittleEndian::Load32(ip) & wordmask[literal_length_length]) + 1;
- ip += literal_length_length;
- }
-
- size_t avail = ip_limit_ - ip;
- while (avail < literal_length) {
- if (!writer->Append(ip, avail)) return;
- literal_length -= avail;
- reader_->Skip(peeked_);
- size_t n;
- ip = reader_->Peek(&n);
- avail = n;
- peeked_ = avail;
- if (avail == 0) return; // Premature end of input
- ip_limit_ = ip + avail;
- }
- if (!writer->Append(ip, literal_length)) {
- return;
- }
- ip += literal_length;
- MAYBE_REFILL();
- } else {
- const uint32 entry = char_table[c];
- const uint32 trailer = LittleEndian::Load32(ip) & wordmask[entry >> 11];
- const uint32 length = entry & 0xff;
- ip += entry >> 11;
-
- // copy_offset/256 is encoded in bits 8..10. By just fetching
- // those bits, we get copy_offset (since the bit-field starts at
- // bit 8).
- const uint32 copy_offset = entry & 0x700;
- if (!writer->AppendFromSelf(copy_offset + trailer, length)) {
- return;
- }
- MAYBE_REFILL();
- }
- }
-
-#undef MAYBE_REFILL
- }
-};
-
-bool SnappyDecompressor::RefillTag() {
- const char* ip = ip_;
- if (ip == ip_limit_) {
- // Fetch a new fragment from the reader
- reader_->Skip(peeked_); // All peeked bytes are used up
- size_t n;
- ip = reader_->Peek(&n);
- peeked_ = n;
- if (n == 0) {
- eof_ = true;
- return false;
- }
- ip_limit_ = ip + n;
- }
-
- // Read the tag character
- assert(ip < ip_limit_);
- const unsigned char c = *(reinterpret_cast<const unsigned char*>(ip));
- const uint32 entry = char_table[c];
- const uint32 needed = (entry >> 11) + 1; // +1 byte for 'c'
- assert(needed <= sizeof(scratch_));
-
- // Read more bytes from reader if needed
- uint32 nbuf = ip_limit_ - ip;
- if (nbuf < needed) {
- // Stitch together bytes from ip and reader to form the word
- // contents. We store the needed bytes in "scratch_". They
- // will be consumed immediately by the caller since we do not
- // read more than we need.
- memmove(scratch_, ip, nbuf);
- reader_->Skip(peeked_); // All peeked bytes are used up
- peeked_ = 0;
- while (nbuf < needed) {
- size_t length;
- const char* src = reader_->Peek(&length);
- if (length == 0) return false;
- uint32 to_add = min<uint32>(needed - nbuf, length);
- memcpy(scratch_ + nbuf, src, to_add);
- nbuf += to_add;
- reader_->Skip(to_add);
- }
- assert(nbuf == needed);
- ip_ = scratch_;
- ip_limit_ = scratch_ + needed;
- } else if (nbuf < kMaximumTagLength) {
- // Have enough bytes, but move into scratch_ so that we do not
- // read past end of input
- memmove(scratch_, ip, nbuf);
- reader_->Skip(peeked_); // All peeked bytes are used up
- peeked_ = 0;
- ip_ = scratch_;
- ip_limit_ = scratch_ + nbuf;
- } else {
- // Pass pointer to buffer returned by reader_.
- ip_ = ip;
- }
- return true;
-}
-
-template <typename Writer>
-static bool InternalUncompress(Source* r, Writer* writer) {
- // Read the uncompressed length from the front of the compressed input
- SnappyDecompressor decompressor(r);
- uint32 uncompressed_len = 0;
- if (!decompressor.ReadUncompressedLength(&uncompressed_len)) return false;
- return InternalUncompressAllTags(&decompressor, writer, uncompressed_len);
-}
-
-template <typename Writer>
-static bool InternalUncompressAllTags(SnappyDecompressor* decompressor,
- Writer* writer,
- uint32 uncompressed_len) {
- writer->SetExpectedLength(uncompressed_len);
-
- // Process the entire input
- decompressor->DecompressAllTags(writer);
- return (decompressor->eof() && writer->CheckLength());
-}
-
-bool GetUncompressedLength(Source* source, uint32* result) {
- SnappyDecompressor decompressor(source);
- return decompressor.ReadUncompressedLength(result);
-}
-
-size_t Compress(Source* reader, Sink* writer) {
- size_t written = 0;
- size_t N = reader->Available();
- char ulength[Varint::kMax32];
- char* p = Varint::Encode32(ulength, N);
- writer->Append(ulength, p-ulength);
- written += (p - ulength);
-
- internal::WorkingMemory wmem;
- char* scratch = NULL;
- char* scratch_output = NULL;
-
- while (N > 0) {
- // Get next block to compress (without copying if possible)
- size_t fragment_size;
- const char* fragment = reader->Peek(&fragment_size);
- assert(fragment_size != 0); // premature end of input
- const size_t num_to_read = min(N, kBlockSize);
- size_t bytes_read = fragment_size;
-
- size_t pending_advance = 0;
- if (bytes_read >= num_to_read) {
- // Buffer returned by reader is large enough
- pending_advance = num_to_read;
- fragment_size = num_to_read;
- } else {
- // Read into scratch buffer
- if (scratch == NULL) {
- // If this is the last iteration, we want to allocate N bytes
- // of space, otherwise the max possible kBlockSize space.
- // num_to_read contains exactly the correct value
- scratch = new char[num_to_read];
- }
- memcpy(scratch, fragment, bytes_read);
- reader->Skip(bytes_read);
-
- while (bytes_read < num_to_read) {
- fragment = reader->Peek(&fragment_size);
- size_t n = min<size_t>(fragment_size, num_to_read - bytes_read);
- memcpy(scratch + bytes_read, fragment, n);
- bytes_read += n;
- reader->Skip(n);
- }
- assert(bytes_read == num_to_read);
- fragment = scratch;
- fragment_size = num_to_read;
- }
- assert(fragment_size == num_to_read);
-
- // Get encoding table for compression
- int table_size;
- uint16* table = wmem.GetHashTable(num_to_read, &table_size);
-
- // Compress input_fragment and append to dest
- const int max_output = MaxCompressedLength(num_to_read);
-
- // Need a scratch buffer for the output, in case the byte sink doesn't
- // have room for us directly.
- if (scratch_output == NULL) {
- scratch_output = new char[max_output];
- } else {
- // Since we encode kBlockSize regions followed by a region
- // which is <= kBlockSize in length, a previously allocated
- // scratch_output[] region is big enough for this iteration.
- }
- char* dest = writer->GetAppendBuffer(max_output, scratch_output);
- char* end = internal::CompressFragment(fragment, fragment_size,
- dest, table, table_size);
- writer->Append(dest, end - dest);
- written += (end - dest);
-
- N -= num_to_read;
- reader->Skip(pending_advance);
- }
-
- delete[] scratch;
- delete[] scratch_output;
-
- return written;
-}
-
-// -----------------------------------------------------------------------
-// IOVec interfaces
-// -----------------------------------------------------------------------
-
-// A type that writes to an iovec.
-// Note that this is not a "ByteSink", but a type that matches the
-// Writer template argument to SnappyDecompressor::DecompressAllTags().
-class SnappyIOVecWriter {
- private:
- const struct iovec* output_iov_;
- const size_t output_iov_count_;
-
- // We are currently writing into output_iov_[curr_iov_index_].
- int curr_iov_index_;
-
- // Bytes written to output_iov_[curr_iov_index_] so far.
- size_t curr_iov_written_;
-
- // Total bytes decompressed into output_iov_ so far.
- size_t total_written_;
-
- // Maximum number of bytes that will be decompressed into output_iov_.
- size_t output_limit_;
-
- inline char* GetIOVecPointer(int index, size_t offset) {
- return reinterpret_cast<char*>(output_iov_[index].iov_base) +
- offset;
- }
-
- public:
- // Does not take ownership of iov. iov must be valid during the
- // entire lifetime of the SnappyIOVecWriter.
- inline SnappyIOVecWriter(const struct iovec* iov, size_t iov_count)
- : output_iov_(iov),
- output_iov_count_(iov_count),
- curr_iov_index_(0),
- curr_iov_written_(0),
- total_written_(0),
- output_limit_(-1) {
- }
-
- inline void SetExpectedLength(size_t len) {
- output_limit_ = len;
- }
-
- inline bool CheckLength() const {
- return total_written_ == output_limit_;
- }
-
- inline bool Append(const char* ip, size_t len) {
- if (total_written_ + len > output_limit_) {
- return false;
- }
-
- while (len > 0) {
- assert(curr_iov_written_ <= output_iov_[curr_iov_index_].iov_len);
- if (curr_iov_written_ >= output_iov_[curr_iov_index_].iov_len) {
- // This iovec is full. Go to the next one.
- if (curr_iov_index_ + 1 >= output_iov_count_) {
- return false;
- }
- curr_iov_written_ = 0;
- ++curr_iov_index_;
- }
-
- const size_t to_write = std::min(
- len, output_iov_[curr_iov_index_].iov_len - curr_iov_written_);
- memcpy(GetIOVecPointer(curr_iov_index_, curr_iov_written_),
- ip,
- to_write);
- curr_iov_written_ += to_write;
- total_written_ += to_write;
- ip += to_write;
- len -= to_write;
- }
-
- return true;
- }
-
- inline bool TryFastAppend(const char* ip, size_t available, size_t len) {
- const size_t space_left = output_limit_ - total_written_;
- if (len <= 16 && available >= 16 + kMaximumTagLength && space_left >= 16 &&
- output_iov_[curr_iov_index_].iov_len - curr_iov_written_ >= 16) {
- // Fast path, used for the majority (about 95%) of invocations.
- char* ptr = GetIOVecPointer(curr_iov_index_, curr_iov_written_);
- UnalignedCopy64(ip, ptr);
- UnalignedCopy64(ip + 8, ptr + 8);
- curr_iov_written_ += len;
- total_written_ += len;
- return true;
- }
-
- return false;
- }
-
- inline bool AppendFromSelf(size_t offset, size_t len) {
- if (offset > total_written_ || offset == 0) {
- return false;
- }
- const size_t space_left = output_limit_ - total_written_;
- if (len > space_left) {
- return false;
- }
-
- // Locate the iovec from which we need to start the copy.
- int from_iov_index = curr_iov_index_;
- size_t from_iov_offset = curr_iov_written_;
- while (offset > 0) {
- if (from_iov_offset >= offset) {
- from_iov_offset -= offset;
- break;
- }
-
- offset -= from_iov_offset;
- --from_iov_index;
- assert(from_iov_index >= 0);
- from_iov_offset = output_iov_[from_iov_index].iov_len;
- }
-
- // Copy <len> bytes starting from the iovec pointed to by from_iov_index to
- // the current iovec.
- while (len > 0) {
- assert(from_iov_index <= curr_iov_index_);
- if (from_iov_index != curr_iov_index_) {
- const size_t to_copy = std::min(
- output_iov_[from_iov_index].iov_len - from_iov_offset,
- len);
- Append(GetIOVecPointer(from_iov_index, from_iov_offset), to_copy);
- len -= to_copy;
- if (len > 0) {
- ++from_iov_index;
- from_iov_offset = 0;
- }
- } else {
- assert(curr_iov_written_ <= output_iov_[curr_iov_index_].iov_len);
- size_t to_copy = std::min(output_iov_[curr_iov_index_].iov_len -
- curr_iov_written_,
- len);
- if (to_copy == 0) {
- // This iovec is full. Go to the next one.
- if (curr_iov_index_ + 1 >= output_iov_count_) {
- return false;
- }
- ++curr_iov_index_;
- curr_iov_written_ = 0;
- continue;
- }
- if (to_copy > len) {
- to_copy = len;
- }
- IncrementalCopy(GetIOVecPointer(from_iov_index, from_iov_offset),
- GetIOVecPointer(curr_iov_index_, curr_iov_written_),
- to_copy);
- curr_iov_written_ += to_copy;
- from_iov_offset += to_copy;
- total_written_ += to_copy;
- len -= to_copy;
- }
- }
-
- return true;
- }
-
-};
-
-bool RawUncompressToIOVec(const char* compressed, size_t compressed_length,
- const struct iovec* iov, size_t iov_cnt) {
- ByteArraySource reader(compressed, compressed_length);
- return RawUncompressToIOVec(&reader, iov, iov_cnt);
-}
-
-bool RawUncompressToIOVec(Source* compressed, const struct iovec* iov,
- size_t iov_cnt) {
- SnappyIOVecWriter output(iov, iov_cnt);
- return InternalUncompress(compressed, &output);
-}
-
-// -----------------------------------------------------------------------
-// Flat array interfaces
-// -----------------------------------------------------------------------
-
-// A type that writes to a flat array.
-// Note that this is not a "ByteSink", but a type that matches the
-// Writer template argument to SnappyDecompressor::DecompressAllTags().
-class SnappyArrayWriter {
- private:
- char* base_;
- char* op_;
- char* op_limit_;
-
- public:
- inline explicit SnappyArrayWriter(char* dst)
- : base_(dst),
- op_(dst) {
- }
-
- inline void SetExpectedLength(size_t len) {
- op_limit_ = op_ + len;
- }
-
- inline bool CheckLength() const {
- return op_ == op_limit_;
- }
-
- inline bool Append(const char* ip, size_t len) {
- char* op = op_;
- const size_t space_left = op_limit_ - op;
- if (space_left < len) {
- return false;
- }
- memcpy(op, ip, len);
- op_ = op + len;
- return true;
- }
-
- inline bool TryFastAppend(const char* ip, size_t available, size_t len) {
- char* op = op_;
- const size_t space_left = op_limit_ - op;
- if (len <= 16 && available >= 16 + kMaximumTagLength && space_left >= 16) {
- // Fast path, used for the majority (about 95%) of invocations.
- UnalignedCopy64(ip, op);
- UnalignedCopy64(ip + 8, op + 8);
- op_ = op + len;
- return true;
- } else {
- return false;
- }
- }
-
- inline bool AppendFromSelf(size_t offset, size_t len) {
- char* op = op_;
- const size_t space_left = op_limit_ - op;
-
- // Check if we try to append from before the start of the buffer.
- // Normally this would just be a check for "produced < offset",
- // but "produced <= offset - 1u" is equivalent for every case
- // except the one where offset==0, where the right side will wrap around
- // to a very big number. This is convenient, as offset==0 is another
- // invalid case that we also want to catch, so that we do not go
- // into an infinite loop.
- assert(op >= base_);
- size_t produced = op - base_;
- if (produced <= offset - 1u) {
- return false;
- }
- if (len <= 16 && offset >= 8 && space_left >= 16) {
- // Fast path, used for the majority (70-80%) of dynamic invocations.
- UnalignedCopy64(op - offset, op);
- UnalignedCopy64(op - offset + 8, op + 8);
- } else {
- if (space_left >= len + kMaxIncrementCopyOverflow) {
- IncrementalCopyFastPath(op - offset, op, len);
- } else {
- if (space_left < len) {
- return false;
- }
- IncrementalCopy(op - offset, op, len);
- }
- }
-
- op_ = op + len;
- return true;
- }
-};
-
-bool RawUncompress(const char* compressed, size_t n, char* uncompressed) {
- ByteArraySource reader(compressed, n);
- return RawUncompress(&reader, uncompressed);
-}
-
-bool RawUncompress(Source* compressed, char* uncompressed) {
- SnappyArrayWriter output(uncompressed);
- return InternalUncompress(compressed, &output);
-}
-
-bool Uncompress(const char* compressed, size_t n, string* uncompressed) {
- size_t ulength;
- if (!GetUncompressedLength(compressed, n, &ulength)) {
- return false;
- }
- // On 32-bit builds: max_size() < kuint32max. Check for that instead
- // of crashing (e.g., consider externally specified compressed data).
- if (ulength > uncompressed->max_size()) {
- return false;
- }
- STLStringResizeUninitialized(uncompressed, ulength);
- return RawUncompress(compressed, n, string_as_array(uncompressed));
-}
-
-
-// A Writer that drops everything on the floor and just does validation
-class SnappyDecompressionValidator {
- private:
- size_t expected_;
- size_t produced_;
-
- public:
- inline SnappyDecompressionValidator() : produced_(0) { }
- inline void SetExpectedLength(size_t len) {
- expected_ = len;
- }
- inline bool CheckLength() const {
- return expected_ == produced_;
- }
- inline bool Append(const char* ip, size_t len) {
- produced_ += len;
- return produced_ <= expected_;
- }
- inline bool TryFastAppend(const char* ip, size_t available, size_t length) {
- return false;
- }
- inline bool AppendFromSelf(size_t offset, size_t len) {
- // See SnappyArrayWriter::AppendFromSelf for an explanation of
- // the "offset - 1u" trick.
- if (produced_ <= offset - 1u) return false;
- produced_ += len;
- return produced_ <= expected_;
- }
-};
-
-bool IsValidCompressedBuffer(const char* compressed, size_t n) {
- ByteArraySource reader(compressed, n);
- SnappyDecompressionValidator writer;
- return InternalUncompress(&reader, &writer);
-}
-
-void RawCompress(const char* input,
- size_t input_length,
- char* compressed,
- size_t* compressed_length) {
- ByteArraySource reader(input, input_length);
- UncheckedByteArraySink writer(compressed);
- Compress(&reader, &writer);
-
- // Compute how many bytes were added
- *compressed_length = (writer.CurrentDestination() - compressed);
-}
-
-size_t Compress(const char* input, size_t input_length, string* compressed) {
- // Pre-grow the buffer to the max length of the compressed output
- compressed->resize(MaxCompressedLength(input_length));
-
- size_t compressed_length;
- RawCompress(input, input_length, string_as_array(compressed),
- &compressed_length);
- compressed->resize(compressed_length);
- return compressed_length;
-}
-
-
-} // end namespace snappy
-
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/snappy-1.1.2/snappy.h
----------------------------------------------------------------------
diff --git a/c++/libs/snappy-1.1.2/snappy.h b/c++/libs/snappy-1.1.2/snappy.h
deleted file mode 100644
index e879e79..0000000
--- a/c++/libs/snappy-1.1.2/snappy.h
+++ /dev/null
@@ -1,184 +0,0 @@
-// Copyright 2005 and onwards Google Inc.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// A light-weight compression algorithm. It is designed for speed of
-// compression and decompression, rather than for the utmost in space
-// savings.
-//
-// For getting better compression ratios when you are compressing data
-// with long repeated sequences or compressing data that is similar to
-// other data, while still compressing fast, you might look at first
-// using BMDiff and then compressing the output of BMDiff with
-// Snappy.
-
-#ifndef UTIL_SNAPPY_SNAPPY_H__
-#define UTIL_SNAPPY_SNAPPY_H__
-
-#include <stddef.h>
-#include <string>
-
-#include "snappy-stubs-public.h"
-
-namespace snappy {
- class Source;
- class Sink;
-
- // ------------------------------------------------------------------------
- // Generic compression/decompression routines.
- // ------------------------------------------------------------------------
-
- // Compress the bytes read from "*source" and append to "*sink". Return the
- // number of bytes written.
- size_t Compress(Source* source, Sink* sink);
-
- // Find the uncompressed length of the given stream, as given by the header.
- // Note that the true length could deviate from this; the stream could e.g.
- // be truncated.
- //
- // Also note that this leaves "*source" in a state that is unsuitable for
- // further operations, such as RawUncompress(). You will need to rewind
- // or recreate the source yourself before attempting any further calls.
- bool GetUncompressedLength(Source* source, uint32* result);
-
- // ------------------------------------------------------------------------
- // Higher-level string based routines (should be sufficient for most users)
- // ------------------------------------------------------------------------
-
- // Sets "*output" to the compressed version of "input[0,input_length-1]".
- // Original contents of *output are lost.
- //
- // REQUIRES: "input[]" is not an alias of "*output".
- size_t Compress(const char* input, size_t input_length, string* output);
-
- // Decompresses "compressed[0,compressed_length-1]" to "*uncompressed".
- // Original contents of "*uncompressed" are lost.
- //
- // REQUIRES: "compressed[]" is not an alias of "*uncompressed".
- //
- // returns false if the message is corrupted and could not be decompressed
- bool Uncompress(const char* compressed, size_t compressed_length,
- string* uncompressed);
-
-
- // ------------------------------------------------------------------------
- // Lower-level character array based routines. May be useful for
- // efficiency reasons in certain circumstances.
- // ------------------------------------------------------------------------
-
- // REQUIRES: "compressed" must point to an area of memory that is at
- // least "MaxCompressedLength(input_length)" bytes in length.
- //
- // Takes the data stored in "input[0..input_length]" and stores
- // it in the array pointed to by "compressed".
- //
- // "*compressed_length" is set to the length of the compressed output.
- //
- // Example:
- // char* output = new char[snappy::MaxCompressedLength(input_length)];
- // size_t output_length;
- // RawCompress(input, input_length, output, &output_length);
- // ... Process(output, output_length) ...
- // delete [] output;
- void RawCompress(const char* input,
- size_t input_length,
- char* compressed,
- size_t* compressed_length);
-
- // Given data in "compressed[0..compressed_length-1]" generated by
- // calling the Snappy::Compress routine, this routine
- // stores the uncompressed data to
- // uncompressed[0..GetUncompressedLength(compressed)-1]
- // returns false if the message is corrupted and could not be decrypted
- bool RawUncompress(const char* compressed, size_t compressed_length,
- char* uncompressed);
-
- // Given data from the byte source 'compressed' generated by calling
- // the Snappy::Compress routine, this routine stores the uncompressed
- // data to
- // uncompressed[0..GetUncompressedLength(compressed,compressed_length)-1]
- // returns false if the message is corrupted and could not be decrypted
- bool RawUncompress(Source* compressed, char* uncompressed);
-
- // Given data in "compressed[0..compressed_length-1]" generated by
- // calling the Snappy::Compress routine, this routine
- // stores the uncompressed data to the iovec "iov". The number of physical
- // buffers in "iov" is given by iov_cnt and their cumulative size
- // must be at least GetUncompressedLength(compressed). The individual buffers
- // in "iov" must not overlap with each other.
- //
- // returns false if the message is corrupted and could not be decrypted
- bool RawUncompressToIOVec(const char* compressed, size_t compressed_length,
- const struct iovec* iov, size_t iov_cnt);
-
- // Given data from the byte source 'compressed' generated by calling
- // the Snappy::Compress routine, this routine stores the uncompressed
- // data to the iovec "iov". The number of physical
- // buffers in "iov" is given by iov_cnt and their cumulative size
- // must be at least GetUncompressedLength(compressed). The individual buffers
- // in "iov" must not overlap with each other.
- //
- // returns false if the message is corrupted and could not be decrypted
- bool RawUncompressToIOVec(Source* compressed, const struct iovec* iov,
- size_t iov_cnt);
-
- // Returns the maximal size of the compressed representation of
- // input data that is "source_bytes" bytes in length;
- size_t MaxCompressedLength(size_t source_bytes);
-
- // REQUIRES: "compressed[]" was produced by RawCompress() or Compress()
- // Returns true and stores the length of the uncompressed data in
- // *result normally. Returns false on parsing error.
- // This operation takes O(1) time.
- bool GetUncompressedLength(const char* compressed, size_t compressed_length,
- size_t* result);
-
- // Returns true iff the contents of "compressed[]" can be uncompressed
- // successfully. Does not return the uncompressed data. Takes
- // time proportional to compressed_length, but is usually at least
- // a factor of four faster than actual decompression.
- bool IsValidCompressedBuffer(const char* compressed,
- size_t compressed_length);
-
- // The size of a compression block. Note that many parts of the compression
- // code assumes that kBlockSize <= 65536; in particular, the hash table
- // can only store 16-bit offsets, and EmitCopy() also assumes the offset
- // is 65535 bytes or less. Note also that if you change this, it will
- // affect the framing format (see framing_format.txt).
- //
- // Note that there might be older data around that is compressed with larger
- // block sizes, so the decompression code should not rely on the
- // non-existence of long backreferences.
- static const int kBlockLog = 16;
- static const size_t kBlockSize = 1 << kBlockLog;
-
- static const int kMaxHashTableBits = 14;
- static const size_t kMaxHashTableSize = 1 << kMaxHashTableBits;
-} // end namespace snappy
-
-
-#endif // UTIL_SNAPPY_SNAPPY_H__
[15/51] [partial] orc git commit: ORC-204 Update and use CMake
External Project to build C++ compression libraries.
Posted by om...@apache.org.
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/minizip/unzip.h
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/minizip/unzip.h b/c++/libs/zlib-1.2.8/contrib/minizip/unzip.h
deleted file mode 100644
index 2104e39..0000000
--- a/c++/libs/zlib-1.2.8/contrib/minizip/unzip.h
+++ /dev/null
@@ -1,437 +0,0 @@
-/* unzip.h -- IO for uncompress .zip files using zlib
- Version 1.1, February 14h, 2010
- part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
-
- Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
-
- Modifications of Unzip for Zip64
- Copyright (C) 2007-2008 Even Rouault
-
- Modifications for Zip64 support on both zip and unzip
- Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
-
- For more info read MiniZip_info.txt
-
- ---------------------------------------------------------------------------------
-
- Condition of use and distribution are the same than zlib :
-
- This software is provided 'as-is', without any express or implied
- warranty. In no event will the authors be held liable for any damages
- arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source distribution.
-
- ---------------------------------------------------------------------------------
-
- Changes
-
- See header of unzip64.c
-
-*/
-
-#ifndef _unz64_H
-#define _unz64_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _ZLIB_H
-#include "zlib.h"
-#endif
-
-#ifndef _ZLIBIOAPI_H
-#include "ioapi.h"
-#endif
-
-#ifdef HAVE_BZIP2
-#include "bzlib.h"
-#endif
-
-#define Z_BZIP2ED 12
-
-#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)
-/* like the STRICT of WIN32, we define a pointer that cannot be converted
- from (void*) without cast */
-typedef struct TagunzFile__ { int unused; } unzFile__;
-typedef unzFile__ *unzFile;
-#else
-typedef voidp unzFile;
-#endif
-
-
-#define UNZ_OK (0)
-#define UNZ_END_OF_LIST_OF_FILE (-100)
-#define UNZ_ERRNO (Z_ERRNO)
-#define UNZ_EOF (0)
-#define UNZ_PARAMERROR (-102)
-#define UNZ_BADZIPFILE (-103)
-#define UNZ_INTERNALERROR (-104)
-#define UNZ_CRCERROR (-105)
-
-/* tm_unz contain date/time info */
-typedef struct tm_unz_s
-{
- uInt tm_sec; /* seconds after the minute - [0,59] */
- uInt tm_min; /* minutes after the hour - [0,59] */
- uInt tm_hour; /* hours since midnight - [0,23] */
- uInt tm_mday; /* day of the month - [1,31] */
- uInt tm_mon; /* months since January - [0,11] */
- uInt tm_year; /* years - [1980..2044] */
-} tm_unz;
-
-/* unz_global_info structure contain global data about the ZIPfile
- These data comes from the end of central dir */
-typedef struct unz_global_info64_s
-{
- ZPOS64_T number_entry; /* total number of entries in
- the central dir on this disk */
- uLong size_comment; /* size of the global comment of the zipfile */
-} unz_global_info64;
-
-typedef struct unz_global_info_s
-{
- uLong number_entry; /* total number of entries in
- the central dir on this disk */
- uLong size_comment; /* size of the global comment of the zipfile */
-} unz_global_info;
-
-/* unz_file_info contain information about a file in the zipfile */
-typedef struct unz_file_info64_s
-{
- uLong version; /* version made by 2 bytes */
- uLong version_needed; /* version needed to extract 2 bytes */
- uLong flag; /* general purpose bit flag 2 bytes */
- uLong compression_method; /* compression method 2 bytes */
- uLong dosDate; /* last mod file date in Dos fmt 4 bytes */
- uLong crc; /* crc-32 4 bytes */
- ZPOS64_T compressed_size; /* compressed size 8 bytes */
- ZPOS64_T uncompressed_size; /* uncompressed size 8 bytes */
- uLong size_filename; /* filename length 2 bytes */
- uLong size_file_extra; /* extra field length 2 bytes */
- uLong size_file_comment; /* file comment length 2 bytes */
-
- uLong disk_num_start; /* disk number start 2 bytes */
- uLong internal_fa; /* internal file attributes 2 bytes */
- uLong external_fa; /* external file attributes 4 bytes */
-
- tm_unz tmu_date;
-} unz_file_info64;
-
-typedef struct unz_file_info_s
-{
- uLong version; /* version made by 2 bytes */
- uLong version_needed; /* version needed to extract 2 bytes */
- uLong flag; /* general purpose bit flag 2 bytes */
- uLong compression_method; /* compression method 2 bytes */
- uLong dosDate; /* last mod file date in Dos fmt 4 bytes */
- uLong crc; /* crc-32 4 bytes */
- uLong compressed_size; /* compressed size 4 bytes */
- uLong uncompressed_size; /* uncompressed size 4 bytes */
- uLong size_filename; /* filename length 2 bytes */
- uLong size_file_extra; /* extra field length 2 bytes */
- uLong size_file_comment; /* file comment length 2 bytes */
-
- uLong disk_num_start; /* disk number start 2 bytes */
- uLong internal_fa; /* internal file attributes 2 bytes */
- uLong external_fa; /* external file attributes 4 bytes */
-
- tm_unz tmu_date;
-} unz_file_info;
-
-extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1,
- const char* fileName2,
- int iCaseSensitivity));
-/*
- Compare two filename (fileName1,fileName2).
- If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
- If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
- or strcasecmp)
- If iCaseSenisivity = 0, case sensitivity is defaut of your operating system
- (like 1 on Unix, 2 on Windows)
-*/
-
-
-extern unzFile ZEXPORT unzOpen OF((const char *path));
-extern unzFile ZEXPORT unzOpen64 OF((const void *path));
-/*
- Open a Zip file. path contain the full pathname (by example,
- on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer
- "zlib/zlib113.zip".
- If the zipfile cannot be opened (file don't exist or in not valid), the
- return value is NULL.
- Else, the return value is a unzFile Handle, usable with other function
- of this unzip package.
- the "64" function take a const void* pointer, because the path is just the
- value passed to the open64_file_func callback.
- Under Windows, if UNICODE is defined, using fill_fopen64_filefunc, the path
- is a pointer to a wide unicode string (LPCTSTR is LPCWSTR), so const char*
- does not describe the reality
-*/
-
-
-extern unzFile ZEXPORT unzOpen2 OF((const char *path,
- zlib_filefunc_def* pzlib_filefunc_def));
-/*
- Open a Zip file, like unzOpen, but provide a set of file low level API
- for read/write the zip file (see ioapi.h)
-*/
-
-extern unzFile ZEXPORT unzOpen2_64 OF((const void *path,
- zlib_filefunc64_def* pzlib_filefunc_def));
-/*
- Open a Zip file, like unz64Open, but provide a set of file low level API
- for read/write the zip file (see ioapi.h)
-*/
-
-extern int ZEXPORT unzClose OF((unzFile file));
-/*
- Close a ZipFile opened with unzOpen.
- If there is files inside the .Zip opened with unzOpenCurrentFile (see later),
- these files MUST be closed with unzCloseCurrentFile before call unzClose.
- return UNZ_OK if there is no problem. */
-
-extern int ZEXPORT unzGetGlobalInfo OF((unzFile file,
- unz_global_info *pglobal_info));
-
-extern int ZEXPORT unzGetGlobalInfo64 OF((unzFile file,
- unz_global_info64 *pglobal_info));
-/*
- Write info about the ZipFile in the *pglobal_info structure.
- No preparation of the structure is needed
- return UNZ_OK if there is no problem. */
-
-
-extern int ZEXPORT unzGetGlobalComment OF((unzFile file,
- char *szComment,
- uLong uSizeBuf));
-/*
- Get the global comment string of the ZipFile, in the szComment buffer.
- uSizeBuf is the size of the szComment buffer.
- return the number of byte copied or an error code <0
-*/
-
-
-/***************************************************************************/
-/* Unzip package allow you browse the directory of the zipfile */
-
-extern int ZEXPORT unzGoToFirstFile OF((unzFile file));
-/*
- Set the current file of the zipfile to the first file.
- return UNZ_OK if there is no problem
-*/
-
-extern int ZEXPORT unzGoToNextFile OF((unzFile file));
-/*
- Set the current file of the zipfile to the next file.
- return UNZ_OK if there is no problem
- return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
-*/
-
-extern int ZEXPORT unzLocateFile OF((unzFile file,
- const char *szFileName,
- int iCaseSensitivity));
-/*
- Try locate the file szFileName in the zipfile.
- For the iCaseSensitivity signification, see unzStringFileNameCompare
-
- return value :
- UNZ_OK if the file is found. It becomes the current file.
- UNZ_END_OF_LIST_OF_FILE if the file is not found
-*/
-
-
-/* ****************************************** */
-/* Ryan supplied functions */
-/* unz_file_info contain information about a file in the zipfile */
-typedef struct unz_file_pos_s
-{
- uLong pos_in_zip_directory; /* offset in zip file directory */
- uLong num_of_file; /* # of file */
-} unz_file_pos;
-
-extern int ZEXPORT unzGetFilePos(
- unzFile file,
- unz_file_pos* file_pos);
-
-extern int ZEXPORT unzGoToFilePos(
- unzFile file,
- unz_file_pos* file_pos);
-
-typedef struct unz64_file_pos_s
-{
- ZPOS64_T pos_in_zip_directory; /* offset in zip file directory */
- ZPOS64_T num_of_file; /* # of file */
-} unz64_file_pos;
-
-extern int ZEXPORT unzGetFilePos64(
- unzFile file,
- unz64_file_pos* file_pos);
-
-extern int ZEXPORT unzGoToFilePos64(
- unzFile file,
- const unz64_file_pos* file_pos);
-
-/* ****************************************** */
-
-extern int ZEXPORT unzGetCurrentFileInfo64 OF((unzFile file,
- unz_file_info64 *pfile_info,
- char *szFileName,
- uLong fileNameBufferSize,
- void *extraField,
- uLong extraFieldBufferSize,
- char *szComment,
- uLong commentBufferSize));
-
-extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file,
- unz_file_info *pfile_info,
- char *szFileName,
- uLong fileNameBufferSize,
- void *extraField,
- uLong extraFieldBufferSize,
- char *szComment,
- uLong commentBufferSize));
-/*
- Get Info about the current file
- if pfile_info!=NULL, the *pfile_info structure will contain somes info about
- the current file
- if szFileName!=NULL, the filemane string will be copied in szFileName
- (fileNameBufferSize is the size of the buffer)
- if extraField!=NULL, the extra field information will be copied in extraField
- (extraFieldBufferSize is the size of the buffer).
- This is the Central-header version of the extra field
- if szComment!=NULL, the comment string of the file will be copied in szComment
- (commentBufferSize is the size of the buffer)
-*/
-
-
-/** Addition for GDAL : START */
-
-extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64 OF((unzFile file));
-
-/** Addition for GDAL : END */
-
-
-/***************************************************************************/
-/* for reading the content of the current zipfile, you can open it, read data
- from it, and close it (you can close it before reading all the file)
- */
-
-extern int ZEXPORT unzOpenCurrentFile OF((unzFile file));
-/*
- Open for reading data the current file in the zipfile.
- If there is no error, the return value is UNZ_OK.
-*/
-
-extern int ZEXPORT unzOpenCurrentFilePassword OF((unzFile file,
- const char* password));
-/*
- Open for reading data the current file in the zipfile.
- password is a crypting password
- If there is no error, the return value is UNZ_OK.
-*/
-
-extern int ZEXPORT unzOpenCurrentFile2 OF((unzFile file,
- int* method,
- int* level,
- int raw));
-/*
- Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)
- if raw==1
- *method will receive method of compression, *level will receive level of
- compression
- note : you can set level parameter as NULL (if you did not want known level,
- but you CANNOT set method parameter as NULL
-*/
-
-extern int ZEXPORT unzOpenCurrentFile3 OF((unzFile file,
- int* method,
- int* level,
- int raw,
- const char* password));
-/*
- Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)
- if raw==1
- *method will receive method of compression, *level will receive level of
- compression
- note : you can set level parameter as NULL (if you did not want known level,
- but you CANNOT set method parameter as NULL
-*/
-
-
-extern int ZEXPORT unzCloseCurrentFile OF((unzFile file));
-/*
- Close the file in zip opened with unzOpenCurrentFile
- Return UNZ_CRCERROR if all the file was read but the CRC is not good
-*/
-
-extern int ZEXPORT unzReadCurrentFile OF((unzFile file,
- voidp buf,
- unsigned len));
-/*
- Read bytes from the current file (opened by unzOpenCurrentFile)
- buf contain buffer where data must be copied
- len the size of buf.
-
- return the number of byte copied if somes bytes are copied
- return 0 if the end of file was reached
- return <0 with error code if there is an error
- (UNZ_ERRNO for IO error, or zLib error for uncompress error)
-*/
-
-extern z_off_t ZEXPORT unztell OF((unzFile file));
-
-extern ZPOS64_T ZEXPORT unztell64 OF((unzFile file));
-/*
- Give the current position in uncompressed data
-*/
-
-extern int ZEXPORT unzeof OF((unzFile file));
-/*
- return 1 if the end of file was reached, 0 elsewhere
-*/
-
-extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file,
- voidp buf,
- unsigned len));
-/*
- Read extra field from the current file (opened by unzOpenCurrentFile)
- This is the local-header version of the extra field (sometimes, there is
- more info in the local-header version than in the central-header)
-
- if buf==NULL, it return the size of the local extra field
-
- if buf!=NULL, len is the size of the buffer, the extra header is copied in
- buf.
- the return value is the number of bytes copied in buf, or (if <0)
- the error code
-*/
-
-/***************************************************************************/
-
-/* Get the current file offset */
-extern ZPOS64_T ZEXPORT unzGetOffset64 (unzFile file);
-extern uLong ZEXPORT unzGetOffset (unzFile file);
-
-/* Set the current file offset */
-extern int ZEXPORT unzSetOffset64 (unzFile file, ZPOS64_T pos);
-extern int ZEXPORT unzSetOffset (unzFile file, uLong pos);
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _unz64_H */
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/minizip/zip.c
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/minizip/zip.c b/c++/libs/zlib-1.2.8/contrib/minizip/zip.c
deleted file mode 100644
index ea54853..0000000
--- a/c++/libs/zlib-1.2.8/contrib/minizip/zip.c
+++ /dev/null
@@ -1,2007 +0,0 @@
-/* zip.c -- IO on .zip files using zlib
- Version 1.1, February 14h, 2010
- part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
-
- Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
-
- Modifications for Zip64 support
- Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
-
- For more info read MiniZip_info.txt
-
- Changes
- Oct-2009 - Mathias Svensson - Remove old C style function prototypes
- Oct-2009 - Mathias Svensson - Added Zip64 Support when creating new file archives
- Oct-2009 - Mathias Svensson - Did some code cleanup and refactoring to get better overview of some functions.
- Oct-2009 - Mathias Svensson - Added zipRemoveExtraInfoBlock to strip extra field data from its ZIP64 data
- It is used when recreting zip archive with RAW when deleting items from a zip.
- ZIP64 data is automaticly added to items that needs it, and existing ZIP64 data need to be removed.
- Oct-2009 - Mathias Svensson - Added support for BZIP2 as compression mode (bzip2 lib is required)
- Jan-2010 - back to unzip and minizip 1.0 name scheme, with compatibility layer
-
-*/
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include "zlib.h"
-#include "zip.h"
-
-#ifdef STDC
-# include <stddef.h>
-# include <string.h>
-# include <stdlib.h>
-#endif
-#ifdef NO_ERRNO_H
- extern int errno;
-#else
-# include <errno.h>
-#endif
-
-
-#ifndef local
-# define local static
-#endif
-/* compile with -Dlocal if your debugger can't find static symbols */
-
-#ifndef VERSIONMADEBY
-# define VERSIONMADEBY (0x0) /* platform depedent */
-#endif
-
-#ifndef Z_BUFSIZE
-#define Z_BUFSIZE (64*1024) //(16384)
-#endif
-
-#ifndef Z_MAXFILENAMEINZIP
-#define Z_MAXFILENAMEINZIP (256)
-#endif
-
-#ifndef ALLOC
-# define ALLOC(size) (malloc(size))
-#endif
-#ifndef TRYFREE
-# define TRYFREE(p) {if (p) free(p);}
-#endif
-
-/*
-#define SIZECENTRALDIRITEM (0x2e)
-#define SIZEZIPLOCALHEADER (0x1e)
-*/
-
-/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */
-
-
-// NOT sure that this work on ALL platform
-#define MAKEULONG64(a, b) ((ZPOS64_T)(((unsigned long)(a)) | ((ZPOS64_T)((unsigned long)(b))) << 32))
-
-#ifndef SEEK_CUR
-#define SEEK_CUR 1
-#endif
-
-#ifndef SEEK_END
-#define SEEK_END 2
-#endif
-
-#ifndef SEEK_SET
-#define SEEK_SET 0
-#endif
-
-#ifndef DEF_MEM_LEVEL
-#if MAX_MEM_LEVEL >= 8
-# define DEF_MEM_LEVEL 8
-#else
-# define DEF_MEM_LEVEL MAX_MEM_LEVEL
-#endif
-#endif
-const char zip_copyright[] =" zip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll";
-
-
-#define SIZEDATA_INDATABLOCK (4096-(4*4))
-
-#define LOCALHEADERMAGIC (0x04034b50)
-#define CENTRALHEADERMAGIC (0x02014b50)
-#define ENDHEADERMAGIC (0x06054b50)
-#define ZIP64ENDHEADERMAGIC (0x6064b50)
-#define ZIP64ENDLOCHEADERMAGIC (0x7064b50)
-
-#define FLAG_LOCALHEADER_OFFSET (0x06)
-#define CRC_LOCALHEADER_OFFSET (0x0e)
-
-#define SIZECENTRALHEADER (0x2e) /* 46 */
-
-typedef struct linkedlist_datablock_internal_s
-{
- struct linkedlist_datablock_internal_s* next_datablock;
- uLong avail_in_this_block;
- uLong filled_in_this_block;
- uLong unused; /* for future use and alignement */
- unsigned char data[SIZEDATA_INDATABLOCK];
-} linkedlist_datablock_internal;
-
-typedef struct linkedlist_data_s
-{
- linkedlist_datablock_internal* first_block;
- linkedlist_datablock_internal* last_block;
-} linkedlist_data;
-
-
-typedef struct
-{
- z_stream stream; /* zLib stream structure for inflate */
-#ifdef HAVE_BZIP2
- bz_stream bstream; /* bzLib stream structure for bziped */
-#endif
-
- int stream_initialised; /* 1 is stream is initialised */
- uInt pos_in_buffered_data; /* last written byte in buffered_data */
-
- ZPOS64_T pos_local_header; /* offset of the local header of the file
- currenty writing */
- char* central_header; /* central header data for the current file */
- uLong size_centralExtra;
- uLong size_centralheader; /* size of the central header for cur file */
- uLong size_centralExtraFree; /* Extra bytes allocated to the centralheader but that are not used */
- uLong flag; /* flag of the file currently writing */
-
- int method; /* compression method of file currenty wr.*/
- int raw; /* 1 for directly writing raw data */
- Byte buffered_data[Z_BUFSIZE];/* buffer contain compressed data to be writ*/
- uLong dosDate;
- uLong crc32;
- int encrypt;
- int zip64; /* Add ZIP64 extened information in the extra field */
- ZPOS64_T pos_zip64extrainfo;
- ZPOS64_T totalCompressedData;
- ZPOS64_T totalUncompressedData;
-#ifndef NOCRYPT
- unsigned long keys[3]; /* keys defining the pseudo-random sequence */
- const z_crc_t* pcrc_32_tab;
- int crypt_header_size;
-#endif
-} curfile64_info;
-
-typedef struct
-{
- zlib_filefunc64_32_def z_filefunc;
- voidpf filestream; /* io structore of the zipfile */
- linkedlist_data central_dir;/* datablock with central dir in construction*/
- int in_opened_file_inzip; /* 1 if a file in the zip is currently writ.*/
- curfile64_info ci; /* info on the file curretly writing */
-
- ZPOS64_T begin_pos; /* position of the beginning of the zipfile */
- ZPOS64_T add_position_when_writting_offset;
- ZPOS64_T number_entry;
-
-#ifndef NO_ADDFILEINEXISTINGZIP
- char *globalcomment;
-#endif
-
-} zip64_internal;
-
-
-#ifndef NOCRYPT
-#define INCLUDECRYPTINGCODE_IFCRYPTALLOWED
-#include "crypt.h"
-#endif
-
-local linkedlist_datablock_internal* allocate_new_datablock()
-{
- linkedlist_datablock_internal* ldi;
- ldi = (linkedlist_datablock_internal*)
- ALLOC(sizeof(linkedlist_datablock_internal));
- if (ldi!=NULL)
- {
- ldi->next_datablock = NULL ;
- ldi->filled_in_this_block = 0 ;
- ldi->avail_in_this_block = SIZEDATA_INDATABLOCK ;
- }
- return ldi;
-}
-
-local void free_datablock(linkedlist_datablock_internal* ldi)
-{
- while (ldi!=NULL)
- {
- linkedlist_datablock_internal* ldinext = ldi->next_datablock;
- TRYFREE(ldi);
- ldi = ldinext;
- }
-}
-
-local void init_linkedlist(linkedlist_data* ll)
-{
- ll->first_block = ll->last_block = NULL;
-}
-
-local void free_linkedlist(linkedlist_data* ll)
-{
- free_datablock(ll->first_block);
- ll->first_block = ll->last_block = NULL;
-}
-
-
-local int add_data_in_datablock(linkedlist_data* ll, const void* buf, uLong len)
-{
- linkedlist_datablock_internal* ldi;
- const unsigned char* from_copy;
-
- if (ll==NULL)
- return ZIP_INTERNALERROR;
-
- if (ll->last_block == NULL)
- {
- ll->first_block = ll->last_block = allocate_new_datablock();
- if (ll->first_block == NULL)
- return ZIP_INTERNALERROR;
- }
-
- ldi = ll->last_block;
- from_copy = (unsigned char*)buf;
-
- while (len>0)
- {
- uInt copy_this;
- uInt i;
- unsigned char* to_copy;
-
- if (ldi->avail_in_this_block==0)
- {
- ldi->next_datablock = allocate_new_datablock();
- if (ldi->next_datablock == NULL)
- return ZIP_INTERNALERROR;
- ldi = ldi->next_datablock ;
- ll->last_block = ldi;
- }
-
- if (ldi->avail_in_this_block < len)
- copy_this = (uInt)ldi->avail_in_this_block;
- else
- copy_this = (uInt)len;
-
- to_copy = &(ldi->data[ldi->filled_in_this_block]);
-
- for (i=0;i<copy_this;i++)
- *(to_copy+i)=*(from_copy+i);
-
- ldi->filled_in_this_block += copy_this;
- ldi->avail_in_this_block -= copy_this;
- from_copy += copy_this ;
- len -= copy_this;
- }
- return ZIP_OK;
-}
-
-
-
-/****************************************************************************/
-
-#ifndef NO_ADDFILEINEXISTINGZIP
-/* ===========================================================================
- Inputs a long in LSB order to the given file
- nbByte == 1, 2 ,4 or 8 (byte, short or long, ZPOS64_T)
-*/
-
-local int zip64local_putValue OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T x, int nbByte));
-local int zip64local_putValue (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T x, int nbByte)
-{
- unsigned char buf[8];
- int n;
- for (n = 0; n < nbByte; n++)
- {
- buf[n] = (unsigned char)(x & 0xff);
- x >>= 8;
- }
- if (x != 0)
- { /* data overflow - hack for ZIP64 (X Roche) */
- for (n = 0; n < nbByte; n++)
- {
- buf[n] = 0xff;
- }
- }
-
- if (ZWRITE64(*pzlib_filefunc_def,filestream,buf,nbByte)!=(uLong)nbByte)
- return ZIP_ERRNO;
- else
- return ZIP_OK;
-}
-
-local void zip64local_putValue_inmemory OF((void* dest, ZPOS64_T x, int nbByte));
-local void zip64local_putValue_inmemory (void* dest, ZPOS64_T x, int nbByte)
-{
- unsigned char* buf=(unsigned char*)dest;
- int n;
- for (n = 0; n < nbByte; n++) {
- buf[n] = (unsigned char)(x & 0xff);
- x >>= 8;
- }
-
- if (x != 0)
- { /* data overflow - hack for ZIP64 */
- for (n = 0; n < nbByte; n++)
- {
- buf[n] = 0xff;
- }
- }
-}
-
-/****************************************************************************/
-
-
-local uLong zip64local_TmzDateToDosDate(const tm_zip* ptm)
-{
- uLong year = (uLong)ptm->tm_year;
- if (year>=1980)
- year-=1980;
- else if (year>=80)
- year-=80;
- return
- (uLong) (((ptm->tm_mday) + (32 * (ptm->tm_mon+1)) + (512 * year)) << 16) |
- ((ptm->tm_sec/2) + (32* ptm->tm_min) + (2048 * (uLong)ptm->tm_hour));
-}
-
-
-/****************************************************************************/
-
-local int zip64local_getByte OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, int *pi));
-
-local int zip64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def,voidpf filestream,int* pi)
-{
- unsigned char c;
- int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,&c,1);
- if (err==1)
- {
- *pi = (int)c;
- return ZIP_OK;
- }
- else
- {
- if (ZERROR64(*pzlib_filefunc_def,filestream))
- return ZIP_ERRNO;
- else
- return ZIP_EOF;
- }
-}
-
-
-/* ===========================================================================
- Reads a long in LSB order from the given gz_stream. Sets
-*/
-local int zip64local_getShort OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pX));
-
-local int zip64local_getShort (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong* pX)
-{
- uLong x ;
- int i = 0;
- int err;
-
- err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
- x = (uLong)i;
-
- if (err==ZIP_OK)
- err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
- x += ((uLong)i)<<8;
-
- if (err==ZIP_OK)
- *pX = x;
- else
- *pX = 0;
- return err;
-}
-
-local int zip64local_getLong OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pX));
-
-local int zip64local_getLong (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong* pX)
-{
- uLong x ;
- int i = 0;
- int err;
-
- err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
- x = (uLong)i;
-
- if (err==ZIP_OK)
- err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
- x += ((uLong)i)<<8;
-
- if (err==ZIP_OK)
- err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
- x += ((uLong)i)<<16;
-
- if (err==ZIP_OK)
- err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
- x += ((uLong)i)<<24;
-
- if (err==ZIP_OK)
- *pX = x;
- else
- *pX = 0;
- return err;
-}
-
-local int zip64local_getLong64 OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX));
-
-
-local int zip64local_getLong64 (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX)
-{
- ZPOS64_T x;
- int i = 0;
- int err;
-
- err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
- x = (ZPOS64_T)i;
-
- if (err==ZIP_OK)
- err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
- x += ((ZPOS64_T)i)<<8;
-
- if (err==ZIP_OK)
- err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
- x += ((ZPOS64_T)i)<<16;
-
- if (err==ZIP_OK)
- err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
- x += ((ZPOS64_T)i)<<24;
-
- if (err==ZIP_OK)
- err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
- x += ((ZPOS64_T)i)<<32;
-
- if (err==ZIP_OK)
- err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
- x += ((ZPOS64_T)i)<<40;
-
- if (err==ZIP_OK)
- err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
- x += ((ZPOS64_T)i)<<48;
-
- if (err==ZIP_OK)
- err = zip64local_getByte(pzlib_filefunc_def,filestream,&i);
- x += ((ZPOS64_T)i)<<56;
-
- if (err==ZIP_OK)
- *pX = x;
- else
- *pX = 0;
-
- return err;
-}
-
-#ifndef BUFREADCOMMENT
-#define BUFREADCOMMENT (0x400)
-#endif
-/*
- Locate the Central directory of a zipfile (at the end, just before
- the global comment)
-*/
-local ZPOS64_T zip64local_SearchCentralDir OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream));
-
-local ZPOS64_T zip64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)
-{
- unsigned char* buf;
- ZPOS64_T uSizeFile;
- ZPOS64_T uBackRead;
- ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */
- ZPOS64_T uPosFound=0;
-
- if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
- return 0;
-
-
- uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream);
-
- if (uMaxBack>uSizeFile)
- uMaxBack = uSizeFile;
-
- buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);
- if (buf==NULL)
- return 0;
-
- uBackRead = 4;
- while (uBackRead<uMaxBack)
- {
- uLong uReadSize;
- ZPOS64_T uReadPos ;
- int i;
- if (uBackRead+BUFREADCOMMENT>uMaxBack)
- uBackRead = uMaxBack;
- else
- uBackRead+=BUFREADCOMMENT;
- uReadPos = uSizeFile-uBackRead ;
-
- uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
- (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos);
- if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)
- break;
-
- if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)
- break;
-
- for (i=(int)uReadSize-3; (i--)>0;)
- if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&
- ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06))
- {
- uPosFound = uReadPos+i;
- break;
- }
-
- if (uPosFound!=0)
- break;
- }
- TRYFREE(buf);
- return uPosFound;
-}
-
-/*
-Locate the End of Zip64 Central directory locator and from there find the CD of a zipfile (at the end, just before
-the global comment)
-*/
-local ZPOS64_T zip64local_SearchCentralDir64 OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream));
-
-local ZPOS64_T zip64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)
-{
- unsigned char* buf;
- ZPOS64_T uSizeFile;
- ZPOS64_T uBackRead;
- ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */
- ZPOS64_T uPosFound=0;
- uLong uL;
- ZPOS64_T relativeOffset;
-
- if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
- return 0;
-
- uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream);
-
- if (uMaxBack>uSizeFile)
- uMaxBack = uSizeFile;
-
- buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);
- if (buf==NULL)
- return 0;
-
- uBackRead = 4;
- while (uBackRead<uMaxBack)
- {
- uLong uReadSize;
- ZPOS64_T uReadPos;
- int i;
- if (uBackRead+BUFREADCOMMENT>uMaxBack)
- uBackRead = uMaxBack;
- else
- uBackRead+=BUFREADCOMMENT;
- uReadPos = uSizeFile-uBackRead ;
-
- uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
- (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos);
- if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)
- break;
-
- if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)
- break;
-
- for (i=(int)uReadSize-3; (i--)>0;)
- {
- // Signature "0x07064b50" Zip64 end of central directory locater
- if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && ((*(buf+i+2))==0x06) && ((*(buf+i+3))==0x07))
- {
- uPosFound = uReadPos+i;
- break;
- }
- }
-
- if (uPosFound!=0)
- break;
- }
-
- TRYFREE(buf);
- if (uPosFound == 0)
- return 0;
-
- /* Zip64 end of central directory locator */
- if (ZSEEK64(*pzlib_filefunc_def,filestream, uPosFound,ZLIB_FILEFUNC_SEEK_SET)!=0)
- return 0;
-
- /* the signature, already checked */
- if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK)
- return 0;
-
- /* number of the disk with the start of the zip64 end of central directory */
- if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK)
- return 0;
- if (uL != 0)
- return 0;
-
- /* relative offset of the zip64 end of central directory record */
- if (zip64local_getLong64(pzlib_filefunc_def,filestream,&relativeOffset)!=ZIP_OK)
- return 0;
-
- /* total number of disks */
- if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK)
- return 0;
- if (uL != 1)
- return 0;
-
- /* Goto Zip64 end of central directory record */
- if (ZSEEK64(*pzlib_filefunc_def,filestream, relativeOffset,ZLIB_FILEFUNC_SEEK_SET)!=0)
- return 0;
-
- /* the signature */
- if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK)
- return 0;
-
- if (uL != 0x06064b50) // signature of 'Zip64 end of central directory'
- return 0;
-
- return relativeOffset;
-}
-
-int LoadCentralDirectoryRecord(zip64_internal* pziinit)
-{
- int err=ZIP_OK;
- ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
-
- ZPOS64_T size_central_dir; /* size of the central directory */
- ZPOS64_T offset_central_dir; /* offset of start of central directory */
- ZPOS64_T central_pos;
- uLong uL;
-
- uLong number_disk; /* number of the current dist, used for
- spaning ZIP, unsupported, always 0*/
- uLong number_disk_with_CD; /* number the the disk with central dir, used
- for spaning ZIP, unsupported, always 0*/
- ZPOS64_T number_entry;
- ZPOS64_T number_entry_CD; /* total number of entries in
- the central dir
- (same than number_entry on nospan) */
- uLong VersionMadeBy;
- uLong VersionNeeded;
- uLong size_comment;
-
- int hasZIP64Record = 0;
-
- // check first if we find a ZIP64 record
- central_pos = zip64local_SearchCentralDir64(&pziinit->z_filefunc,pziinit->filestream);
- if(central_pos > 0)
- {
- hasZIP64Record = 1;
- }
- else if(central_pos == 0)
- {
- central_pos = zip64local_SearchCentralDir(&pziinit->z_filefunc,pziinit->filestream);
- }
-
-/* disable to allow appending to empty ZIP archive
- if (central_pos==0)
- err=ZIP_ERRNO;
-*/
-
- if(hasZIP64Record)
- {
- ZPOS64_T sizeEndOfCentralDirectory;
- if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, central_pos, ZLIB_FILEFUNC_SEEK_SET) != 0)
- err=ZIP_ERRNO;
-
- /* the signature, already checked */
- if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&uL)!=ZIP_OK)
- err=ZIP_ERRNO;
-
- /* size of zip64 end of central directory record */
- if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream, &sizeEndOfCentralDirectory)!=ZIP_OK)
- err=ZIP_ERRNO;
-
- /* version made by */
- if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &VersionMadeBy)!=ZIP_OK)
- err=ZIP_ERRNO;
-
- /* version needed to extract */
- if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &VersionNeeded)!=ZIP_OK)
- err=ZIP_ERRNO;
-
- /* number of this disk */
- if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&number_disk)!=ZIP_OK)
- err=ZIP_ERRNO;
-
- /* number of the disk with the start of the central directory */
- if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&number_disk_with_CD)!=ZIP_OK)
- err=ZIP_ERRNO;
-
- /* total number of entries in the central directory on this disk */
- if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream, &number_entry)!=ZIP_OK)
- err=ZIP_ERRNO;
-
- /* total number of entries in the central directory */
- if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&number_entry_CD)!=ZIP_OK)
- err=ZIP_ERRNO;
-
- if ((number_entry_CD!=number_entry) || (number_disk_with_CD!=0) || (number_disk!=0))
- err=ZIP_BADZIPFILE;
-
- /* size of the central directory */
- if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&size_central_dir)!=ZIP_OK)
- err=ZIP_ERRNO;
-
- /* offset of start of central directory with respect to the
- starting disk number */
- if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&offset_central_dir)!=ZIP_OK)
- err=ZIP_ERRNO;
-
- // TODO..
- // read the comment from the standard central header.
- size_comment = 0;
- }
- else
- {
- // Read End of central Directory info
- if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0)
- err=ZIP_ERRNO;
-
- /* the signature, already checked */
- if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&uL)!=ZIP_OK)
- err=ZIP_ERRNO;
-
- /* number of this disk */
- if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream,&number_disk)!=ZIP_OK)
- err=ZIP_ERRNO;
-
- /* number of the disk with the start of the central directory */
- if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream,&number_disk_with_CD)!=ZIP_OK)
- err=ZIP_ERRNO;
-
- /* total number of entries in the central dir on this disk */
- number_entry = 0;
- if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK)
- err=ZIP_ERRNO;
- else
- number_entry = uL;
-
- /* total number of entries in the central dir */
- number_entry_CD = 0;
- if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK)
- err=ZIP_ERRNO;
- else
- number_entry_CD = uL;
-
- if ((number_entry_CD!=number_entry) || (number_disk_with_CD!=0) || (number_disk!=0))
- err=ZIP_BADZIPFILE;
-
- /* size of the central directory */
- size_central_dir = 0;
- if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK)
- err=ZIP_ERRNO;
- else
- size_central_dir = uL;
-
- /* offset of start of central directory with respect to the starting disk number */
- offset_central_dir = 0;
- if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK)
- err=ZIP_ERRNO;
- else
- offset_central_dir = uL;
-
-
- /* zipfile global comment length */
- if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &size_comment)!=ZIP_OK)
- err=ZIP_ERRNO;
- }
-
- if ((central_pos<offset_central_dir+size_central_dir) &&
- (err==ZIP_OK))
- err=ZIP_BADZIPFILE;
-
- if (err!=ZIP_OK)
- {
- ZCLOSE64(pziinit->z_filefunc, pziinit->filestream);
- return ZIP_ERRNO;
- }
-
- if (size_comment>0)
- {
- pziinit->globalcomment = (char*)ALLOC(size_comment+1);
- if (pziinit->globalcomment)
- {
- size_comment = ZREAD64(pziinit->z_filefunc, pziinit->filestream, pziinit->globalcomment,size_comment);
- pziinit->globalcomment[size_comment]=0;
- }
- }
-
- byte_before_the_zipfile = central_pos - (offset_central_dir+size_central_dir);
- pziinit->add_position_when_writting_offset = byte_before_the_zipfile;
-
- {
- ZPOS64_T size_central_dir_to_read = size_central_dir;
- size_t buf_size = SIZEDATA_INDATABLOCK;
- void* buf_read = (void*)ALLOC(buf_size);
- if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, offset_central_dir + byte_before_the_zipfile, ZLIB_FILEFUNC_SEEK_SET) != 0)
- err=ZIP_ERRNO;
-
- while ((size_central_dir_to_read>0) && (err==ZIP_OK))
- {
- ZPOS64_T read_this = SIZEDATA_INDATABLOCK;
- if (read_this > size_central_dir_to_read)
- read_this = size_central_dir_to_read;
-
- if (ZREAD64(pziinit->z_filefunc, pziinit->filestream,buf_read,(uLong)read_this) != read_this)
- err=ZIP_ERRNO;
-
- if (err==ZIP_OK)
- err = add_data_in_datablock(&pziinit->central_dir,buf_read, (uLong)read_this);
-
- size_central_dir_to_read-=read_this;
- }
- TRYFREE(buf_read);
- }
- pziinit->begin_pos = byte_before_the_zipfile;
- pziinit->number_entry = number_entry_CD;
-
- if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, offset_central_dir+byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET) != 0)
- err=ZIP_ERRNO;
-
- return err;
-}
-
-
-#endif /* !NO_ADDFILEINEXISTINGZIP*/
-
-
-/************************************************************/
-extern zipFile ZEXPORT zipOpen3 (const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_32_def* pzlib_filefunc64_32_def)
-{
- zip64_internal ziinit;
- zip64_internal* zi;
- int err=ZIP_OK;
-
- ziinit.z_filefunc.zseek32_file = NULL;
- ziinit.z_filefunc.ztell32_file = NULL;
- if (pzlib_filefunc64_32_def==NULL)
- fill_fopen64_filefunc(&ziinit.z_filefunc.zfile_func64);
- else
- ziinit.z_filefunc = *pzlib_filefunc64_32_def;
-
- ziinit.filestream = ZOPEN64(ziinit.z_filefunc,
- pathname,
- (append == APPEND_STATUS_CREATE) ?
- (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_CREATE) :
- (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_EXISTING));
-
- if (ziinit.filestream == NULL)
- return NULL;
-
- if (append == APPEND_STATUS_CREATEAFTER)
- ZSEEK64(ziinit.z_filefunc,ziinit.filestream,0,SEEK_END);
-
- ziinit.begin_pos = ZTELL64(ziinit.z_filefunc,ziinit.filestream);
- ziinit.in_opened_file_inzip = 0;
- ziinit.ci.stream_initialised = 0;
- ziinit.number_entry = 0;
- ziinit.add_position_when_writting_offset = 0;
- init_linkedlist(&(ziinit.central_dir));
-
-
-
- zi = (zip64_internal*)ALLOC(sizeof(zip64_internal));
- if (zi==NULL)
- {
- ZCLOSE64(ziinit.z_filefunc,ziinit.filestream);
- return NULL;
- }
-
- /* now we add file in a zipfile */
-# ifndef NO_ADDFILEINEXISTINGZIP
- ziinit.globalcomment = NULL;
- if (append == APPEND_STATUS_ADDINZIP)
- {
- // Read and Cache Central Directory Records
- err = LoadCentralDirectoryRecord(&ziinit);
- }
-
- if (globalcomment)
- {
- *globalcomment = ziinit.globalcomment;
- }
-# endif /* !NO_ADDFILEINEXISTINGZIP*/
-
- if (err != ZIP_OK)
- {
-# ifndef NO_ADDFILEINEXISTINGZIP
- TRYFREE(ziinit.globalcomment);
-# endif /* !NO_ADDFILEINEXISTINGZIP*/
- TRYFREE(zi);
- return NULL;
- }
- else
- {
- *zi = ziinit;
- return (zipFile)zi;
- }
-}
-
-extern zipFile ZEXPORT zipOpen2 (const char *pathname, int append, zipcharpc* globalcomment, zlib_filefunc_def* pzlib_filefunc32_def)
-{
- if (pzlib_filefunc32_def != NULL)
- {
- zlib_filefunc64_32_def zlib_filefunc64_32_def_fill;
- fill_zlib_filefunc64_32_def_from_filefunc32(&zlib_filefunc64_32_def_fill,pzlib_filefunc32_def);
- return zipOpen3(pathname, append, globalcomment, &zlib_filefunc64_32_def_fill);
- }
- else
- return zipOpen3(pathname, append, globalcomment, NULL);
-}
-
-extern zipFile ZEXPORT zipOpen2_64 (const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_def* pzlib_filefunc_def)
-{
- if (pzlib_filefunc_def != NULL)
- {
- zlib_filefunc64_32_def zlib_filefunc64_32_def_fill;
- zlib_filefunc64_32_def_fill.zfile_func64 = *pzlib_filefunc_def;
- zlib_filefunc64_32_def_fill.ztell32_file = NULL;
- zlib_filefunc64_32_def_fill.zseek32_file = NULL;
- return zipOpen3(pathname, append, globalcomment, &zlib_filefunc64_32_def_fill);
- }
- else
- return zipOpen3(pathname, append, globalcomment, NULL);
-}
-
-
-
-extern zipFile ZEXPORT zipOpen (const char* pathname, int append)
-{
- return zipOpen3((const void*)pathname,append,NULL,NULL);
-}
-
-extern zipFile ZEXPORT zipOpen64 (const void* pathname, int append)
-{
- return zipOpen3(pathname,append,NULL,NULL);
-}
-
-int Write_LocalFileHeader(zip64_internal* zi, const char* filename, uInt size_extrafield_local, const void* extrafield_local)
-{
- /* write the local header */
- int err;
- uInt size_filename = (uInt)strlen(filename);
- uInt size_extrafield = size_extrafield_local;
-
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)LOCALHEADERMAGIC, 4);
-
- if (err==ZIP_OK)
- {
- if(zi->ci.zip64)
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2);/* version needed to extract */
- else
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)20,2);/* version needed to extract */
- }
-
- if (err==ZIP_OK)
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.flag,2);
-
- if (err==ZIP_OK)
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.method,2);
-
- if (err==ZIP_OK)
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.dosDate,4);
-
- // CRC / Compressed size / Uncompressed size will be filled in later and rewritten later
- if (err==ZIP_OK)
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* crc 32, unknown */
- if (err==ZIP_OK)
- {
- if(zi->ci.zip64)
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xFFFFFFFF,4); /* compressed size, unknown */
- else
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* compressed size, unknown */
- }
- if (err==ZIP_OK)
- {
- if(zi->ci.zip64)
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xFFFFFFFF,4); /* uncompressed size, unknown */
- else
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* uncompressed size, unknown */
- }
-
- if (err==ZIP_OK)
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_filename,2);
-
- if(zi->ci.zip64)
- {
- size_extrafield += 20;
- }
-
- if (err==ZIP_OK)
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_extrafield,2);
-
- if ((err==ZIP_OK) && (size_filename > 0))
- {
- if (ZWRITE64(zi->z_filefunc,zi->filestream,filename,size_filename)!=size_filename)
- err = ZIP_ERRNO;
- }
-
- if ((err==ZIP_OK) && (size_extrafield_local > 0))
- {
- if (ZWRITE64(zi->z_filefunc, zi->filestream, extrafield_local, size_extrafield_local) != size_extrafield_local)
- err = ZIP_ERRNO;
- }
-
-
- if ((err==ZIP_OK) && (zi->ci.zip64))
- {
- // write the Zip64 extended info
- short HeaderID = 1;
- short DataSize = 16;
- ZPOS64_T CompressedSize = 0;
- ZPOS64_T UncompressedSize = 0;
-
- // Remember position of Zip64 extended info for the local file header. (needed when we update size after done with file)
- zi->ci.pos_zip64extrainfo = ZTELL64(zi->z_filefunc,zi->filestream);
-
- err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (short)HeaderID,2);
- err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (short)DataSize,2);
-
- err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)UncompressedSize,8);
- err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)CompressedSize,8);
- }
-
- return err;
-}
-
-/*
- NOTE.
- When writing RAW the ZIP64 extended information in extrafield_local and extrafield_global needs to be stripped
- before calling this function it can be done with zipRemoveExtraInfoBlock
-
- It is not done here because then we need to realloc a new buffer since parameters are 'const' and I want to minimize
- unnecessary allocations.
- */
-extern int ZEXPORT zipOpenNewFileInZip4_64 (zipFile file, const char* filename, const zip_fileinfo* zipfi,
- const void* extrafield_local, uInt size_extrafield_local,
- const void* extrafield_global, uInt size_extrafield_global,
- const char* comment, int method, int level, int raw,
- int windowBits,int memLevel, int strategy,
- const char* password, uLong crcForCrypting,
- uLong versionMadeBy, uLong flagBase, int zip64)
-{
- zip64_internal* zi;
- uInt size_filename;
- uInt size_comment;
- uInt i;
- int err = ZIP_OK;
-
-# ifdef NOCRYPT
- (crcForCrypting);
- if (password != NULL)
- return ZIP_PARAMERROR;
-# endif
-
- if (file == NULL)
- return ZIP_PARAMERROR;
-
-#ifdef HAVE_BZIP2
- if ((method!=0) && (method!=Z_DEFLATED) && (method!=Z_BZIP2ED))
- return ZIP_PARAMERROR;
-#else
- if ((method!=0) && (method!=Z_DEFLATED))
- return ZIP_PARAMERROR;
-#endif
-
- zi = (zip64_internal*)file;
-
- if (zi->in_opened_file_inzip == 1)
- {
- err = zipCloseFileInZip (file);
- if (err != ZIP_OK)
- return err;
- }
-
- if (filename==NULL)
- filename="-";
-
- if (comment==NULL)
- size_comment = 0;
- else
- size_comment = (uInt)strlen(comment);
-
- size_filename = (uInt)strlen(filename);
-
- if (zipfi == NULL)
- zi->ci.dosDate = 0;
- else
- {
- if (zipfi->dosDate != 0)
- zi->ci.dosDate = zipfi->dosDate;
- else
- zi->ci.dosDate = zip64local_TmzDateToDosDate(&zipfi->tmz_date);
- }
-
- zi->ci.flag = flagBase;
- if ((level==8) || (level==9))
- zi->ci.flag |= 2;
- if (level==2)
- zi->ci.flag |= 4;
- if (level==1)
- zi->ci.flag |= 6;
- if (password != NULL)
- zi->ci.flag |= 1;
-
- zi->ci.crc32 = 0;
- zi->ci.method = method;
- zi->ci.encrypt = 0;
- zi->ci.stream_initialised = 0;
- zi->ci.pos_in_buffered_data = 0;
- zi->ci.raw = raw;
- zi->ci.pos_local_header = ZTELL64(zi->z_filefunc,zi->filestream);
-
- zi->ci.size_centralheader = SIZECENTRALHEADER + size_filename + size_extrafield_global + size_comment;
- zi->ci.size_centralExtraFree = 32; // Extra space we have reserved in case we need to add ZIP64 extra info data
-
- zi->ci.central_header = (char*)ALLOC((uInt)zi->ci.size_centralheader + zi->ci.size_centralExtraFree);
-
- zi->ci.size_centralExtra = size_extrafield_global;
- zip64local_putValue_inmemory(zi->ci.central_header,(uLong)CENTRALHEADERMAGIC,4);
- /* version info */
- zip64local_putValue_inmemory(zi->ci.central_header+4,(uLong)versionMadeBy,2);
- zip64local_putValue_inmemory(zi->ci.central_header+6,(uLong)20,2);
- zip64local_putValue_inmemory(zi->ci.central_header+8,(uLong)zi->ci.flag,2);
- zip64local_putValue_inmemory(zi->ci.central_header+10,(uLong)zi->ci.method,2);
- zip64local_putValue_inmemory(zi->ci.central_header+12,(uLong)zi->ci.dosDate,4);
- zip64local_putValue_inmemory(zi->ci.central_header+16,(uLong)0,4); /*crc*/
- zip64local_putValue_inmemory(zi->ci.central_header+20,(uLong)0,4); /*compr size*/
- zip64local_putValue_inmemory(zi->ci.central_header+24,(uLong)0,4); /*uncompr size*/
- zip64local_putValue_inmemory(zi->ci.central_header+28,(uLong)size_filename,2);
- zip64local_putValue_inmemory(zi->ci.central_header+30,(uLong)size_extrafield_global,2);
- zip64local_putValue_inmemory(zi->ci.central_header+32,(uLong)size_comment,2);
- zip64local_putValue_inmemory(zi->ci.central_header+34,(uLong)0,2); /*disk nm start*/
-
- if (zipfi==NULL)
- zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)0,2);
- else
- zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)zipfi->internal_fa,2);
-
- if (zipfi==NULL)
- zip64local_putValue_inmemory(zi->ci.central_header+38,(uLong)0,4);
- else
- zip64local_putValue_inmemory(zi->ci.central_header+38,(uLong)zipfi->external_fa,4);
-
- if(zi->ci.pos_local_header >= 0xffffffff)
- zip64local_putValue_inmemory(zi->ci.central_header+42,(uLong)0xffffffff,4);
- else
- zip64local_putValue_inmemory(zi->ci.central_header+42,(uLong)zi->ci.pos_local_header - zi->add_position_when_writting_offset,4);
-
- for (i=0;i<size_filename;i++)
- *(zi->ci.central_header+SIZECENTRALHEADER+i) = *(filename+i);
-
- for (i=0;i<size_extrafield_global;i++)
- *(zi->ci.central_header+SIZECENTRALHEADER+size_filename+i) =
- *(((const char*)extrafield_global)+i);
-
- for (i=0;i<size_comment;i++)
- *(zi->ci.central_header+SIZECENTRALHEADER+size_filename+
- size_extrafield_global+i) = *(comment+i);
- if (zi->ci.central_header == NULL)
- return ZIP_INTERNALERROR;
-
- zi->ci.zip64 = zip64;
- zi->ci.totalCompressedData = 0;
- zi->ci.totalUncompressedData = 0;
- zi->ci.pos_zip64extrainfo = 0;
-
- err = Write_LocalFileHeader(zi, filename, size_extrafield_local, extrafield_local);
-
-#ifdef HAVE_BZIP2
- zi->ci.bstream.avail_in = (uInt)0;
- zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE;
- zi->ci.bstream.next_out = (char*)zi->ci.buffered_data;
- zi->ci.bstream.total_in_hi32 = 0;
- zi->ci.bstream.total_in_lo32 = 0;
- zi->ci.bstream.total_out_hi32 = 0;
- zi->ci.bstream.total_out_lo32 = 0;
-#endif
-
- zi->ci.stream.avail_in = (uInt)0;
- zi->ci.stream.avail_out = (uInt)Z_BUFSIZE;
- zi->ci.stream.next_out = zi->ci.buffered_data;
- zi->ci.stream.total_in = 0;
- zi->ci.stream.total_out = 0;
- zi->ci.stream.data_type = Z_BINARY;
-
-#ifdef HAVE_BZIP2
- if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED || zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw))
-#else
- if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))
-#endif
- {
- if(zi->ci.method == Z_DEFLATED)
- {
- zi->ci.stream.zalloc = (alloc_func)0;
- zi->ci.stream.zfree = (free_func)0;
- zi->ci.stream.opaque = (voidpf)0;
-
- if (windowBits>0)
- windowBits = -windowBits;
-
- err = deflateInit2(&zi->ci.stream, level, Z_DEFLATED, windowBits, memLevel, strategy);
-
- if (err==Z_OK)
- zi->ci.stream_initialised = Z_DEFLATED;
- }
- else if(zi->ci.method == Z_BZIP2ED)
- {
-#ifdef HAVE_BZIP2
- // Init BZip stuff here
- zi->ci.bstream.bzalloc = 0;
- zi->ci.bstream.bzfree = 0;
- zi->ci.bstream.opaque = (voidpf)0;
-
- err = BZ2_bzCompressInit(&zi->ci.bstream, level, 0,35);
- if(err == BZ_OK)
- zi->ci.stream_initialised = Z_BZIP2ED;
-#endif
- }
-
- }
-
-# ifndef NOCRYPT
- zi->ci.crypt_header_size = 0;
- if ((err==Z_OK) && (password != NULL))
- {
- unsigned char bufHead[RAND_HEAD_LEN];
- unsigned int sizeHead;
- zi->ci.encrypt = 1;
- zi->ci.pcrc_32_tab = get_crc_table();
- /*init_keys(password,zi->ci.keys,zi->ci.pcrc_32_tab);*/
-
- sizeHead=crypthead(password,bufHead,RAND_HEAD_LEN,zi->ci.keys,zi->ci.pcrc_32_tab,crcForCrypting);
- zi->ci.crypt_header_size = sizeHead;
-
- if (ZWRITE64(zi->z_filefunc,zi->filestream,bufHead,sizeHead) != sizeHead)
- err = ZIP_ERRNO;
- }
-# endif
-
- if (err==Z_OK)
- zi->in_opened_file_inzip = 1;
- return err;
-}
-
-extern int ZEXPORT zipOpenNewFileInZip4 (zipFile file, const char* filename, const zip_fileinfo* zipfi,
- const void* extrafield_local, uInt size_extrafield_local,
- const void* extrafield_global, uInt size_extrafield_global,
- const char* comment, int method, int level, int raw,
- int windowBits,int memLevel, int strategy,
- const char* password, uLong crcForCrypting,
- uLong versionMadeBy, uLong flagBase)
-{
- return zipOpenNewFileInZip4_64 (file, filename, zipfi,
- extrafield_local, size_extrafield_local,
- extrafield_global, size_extrafield_global,
- comment, method, level, raw,
- windowBits, memLevel, strategy,
- password, crcForCrypting, versionMadeBy, flagBase, 0);
-}
-
-extern int ZEXPORT zipOpenNewFileInZip3 (zipFile file, const char* filename, const zip_fileinfo* zipfi,
- const void* extrafield_local, uInt size_extrafield_local,
- const void* extrafield_global, uInt size_extrafield_global,
- const char* comment, int method, int level, int raw,
- int windowBits,int memLevel, int strategy,
- const char* password, uLong crcForCrypting)
-{
- return zipOpenNewFileInZip4_64 (file, filename, zipfi,
- extrafield_local, size_extrafield_local,
- extrafield_global, size_extrafield_global,
- comment, method, level, raw,
- windowBits, memLevel, strategy,
- password, crcForCrypting, VERSIONMADEBY, 0, 0);
-}
-
-extern int ZEXPORT zipOpenNewFileInZip3_64(zipFile file, const char* filename, const zip_fileinfo* zipfi,
- const void* extrafield_local, uInt size_extrafield_local,
- const void* extrafield_global, uInt size_extrafield_global,
- const char* comment, int method, int level, int raw,
- int windowBits,int memLevel, int strategy,
- const char* password, uLong crcForCrypting, int zip64)
-{
- return zipOpenNewFileInZip4_64 (file, filename, zipfi,
- extrafield_local, size_extrafield_local,
- extrafield_global, size_extrafield_global,
- comment, method, level, raw,
- windowBits, memLevel, strategy,
- password, crcForCrypting, VERSIONMADEBY, 0, zip64);
-}
-
-extern int ZEXPORT zipOpenNewFileInZip2(zipFile file, const char* filename, const zip_fileinfo* zipfi,
- const void* extrafield_local, uInt size_extrafield_local,
- const void* extrafield_global, uInt size_extrafield_global,
- const char* comment, int method, int level, int raw)
-{
- return zipOpenNewFileInZip4_64 (file, filename, zipfi,
- extrafield_local, size_extrafield_local,
- extrafield_global, size_extrafield_global,
- comment, method, level, raw,
- -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,
- NULL, 0, VERSIONMADEBY, 0, 0);
-}
-
-extern int ZEXPORT zipOpenNewFileInZip2_64(zipFile file, const char* filename, const zip_fileinfo* zipfi,
- const void* extrafield_local, uInt size_extrafield_local,
- const void* extrafield_global, uInt size_extrafield_global,
- const char* comment, int method, int level, int raw, int zip64)
-{
- return zipOpenNewFileInZip4_64 (file, filename, zipfi,
- extrafield_local, size_extrafield_local,
- extrafield_global, size_extrafield_global,
- comment, method, level, raw,
- -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,
- NULL, 0, VERSIONMADEBY, 0, zip64);
-}
-
-extern int ZEXPORT zipOpenNewFileInZip64 (zipFile file, const char* filename, const zip_fileinfo* zipfi,
- const void* extrafield_local, uInt size_extrafield_local,
- const void*extrafield_global, uInt size_extrafield_global,
- const char* comment, int method, int level, int zip64)
-{
- return zipOpenNewFileInZip4_64 (file, filename, zipfi,
- extrafield_local, size_extrafield_local,
- extrafield_global, size_extrafield_global,
- comment, method, level, 0,
- -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,
- NULL, 0, VERSIONMADEBY, 0, zip64);
-}
-
-extern int ZEXPORT zipOpenNewFileInZip (zipFile file, const char* filename, const zip_fileinfo* zipfi,
- const void* extrafield_local, uInt size_extrafield_local,
- const void*extrafield_global, uInt size_extrafield_global,
- const char* comment, int method, int level)
-{
- return zipOpenNewFileInZip4_64 (file, filename, zipfi,
- extrafield_local, size_extrafield_local,
- extrafield_global, size_extrafield_global,
- comment, method, level, 0,
- -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,
- NULL, 0, VERSIONMADEBY, 0, 0);
-}
-
-local int zip64FlushWriteBuffer(zip64_internal* zi)
-{
- int err=ZIP_OK;
-
- if (zi->ci.encrypt != 0)
- {
-#ifndef NOCRYPT
- uInt i;
- int t;
- for (i=0;i<zi->ci.pos_in_buffered_data;i++)
- zi->ci.buffered_data[i] = zencode(zi->ci.keys, zi->ci.pcrc_32_tab, zi->ci.buffered_data[i],t);
-#endif
- }
-
- if (ZWRITE64(zi->z_filefunc,zi->filestream,zi->ci.buffered_data,zi->ci.pos_in_buffered_data) != zi->ci.pos_in_buffered_data)
- err = ZIP_ERRNO;
-
- zi->ci.totalCompressedData += zi->ci.pos_in_buffered_data;
-
-#ifdef HAVE_BZIP2
- if(zi->ci.method == Z_BZIP2ED)
- {
- zi->ci.totalUncompressedData += zi->ci.bstream.total_in_lo32;
- zi->ci.bstream.total_in_lo32 = 0;
- zi->ci.bstream.total_in_hi32 = 0;
- }
- else
-#endif
- {
- zi->ci.totalUncompressedData += zi->ci.stream.total_in;
- zi->ci.stream.total_in = 0;
- }
-
-
- zi->ci.pos_in_buffered_data = 0;
-
- return err;
-}
-
-extern int ZEXPORT zipWriteInFileInZip (zipFile file,const void* buf,unsigned int len)
-{
- zip64_internal* zi;
- int err=ZIP_OK;
-
- if (file == NULL)
- return ZIP_PARAMERROR;
- zi = (zip64_internal*)file;
-
- if (zi->in_opened_file_inzip == 0)
- return ZIP_PARAMERROR;
-
- zi->ci.crc32 = crc32(zi->ci.crc32,buf,(uInt)len);
-
-#ifdef HAVE_BZIP2
- if(zi->ci.method == Z_BZIP2ED && (!zi->ci.raw))
- {
- zi->ci.bstream.next_in = (void*)buf;
- zi->ci.bstream.avail_in = len;
- err = BZ_RUN_OK;
-
- while ((err==BZ_RUN_OK) && (zi->ci.bstream.avail_in>0))
- {
- if (zi->ci.bstream.avail_out == 0)
- {
- if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO)
- err = ZIP_ERRNO;
- zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE;
- zi->ci.bstream.next_out = (char*)zi->ci.buffered_data;
- }
-
-
- if(err != BZ_RUN_OK)
- break;
-
- if ((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw))
- {
- uLong uTotalOutBefore_lo = zi->ci.bstream.total_out_lo32;
-// uLong uTotalOutBefore_hi = zi->ci.bstream.total_out_hi32;
- err=BZ2_bzCompress(&zi->ci.bstream, BZ_RUN);
-
- zi->ci.pos_in_buffered_data += (uInt)(zi->ci.bstream.total_out_lo32 - uTotalOutBefore_lo) ;
- }
- }
-
- if(err == BZ_RUN_OK)
- err = ZIP_OK;
- }
- else
-#endif
- {
- zi->ci.stream.next_in = (Bytef*)buf;
- zi->ci.stream.avail_in = len;
-
- while ((err==ZIP_OK) && (zi->ci.stream.avail_in>0))
- {
- if (zi->ci.stream.avail_out == 0)
- {
- if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO)
- err = ZIP_ERRNO;
- zi->ci.stream.avail_out = (uInt)Z_BUFSIZE;
- zi->ci.stream.next_out = zi->ci.buffered_data;
- }
-
-
- if(err != ZIP_OK)
- break;
-
- if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))
- {
- uLong uTotalOutBefore = zi->ci.stream.total_out;
- err=deflate(&zi->ci.stream, Z_NO_FLUSH);
- if(uTotalOutBefore > zi->ci.stream.total_out)
- {
- int bBreak = 0;
- bBreak++;
- }
-
- zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ;
- }
- else
- {
- uInt copy_this,i;
- if (zi->ci.stream.avail_in < zi->ci.stream.avail_out)
- copy_this = zi->ci.stream.avail_in;
- else
- copy_this = zi->ci.stream.avail_out;
-
- for (i = 0; i < copy_this; i++)
- *(((char*)zi->ci.stream.next_out)+i) =
- *(((const char*)zi->ci.stream.next_in)+i);
- {
- zi->ci.stream.avail_in -= copy_this;
- zi->ci.stream.avail_out-= copy_this;
- zi->ci.stream.next_in+= copy_this;
- zi->ci.stream.next_out+= copy_this;
- zi->ci.stream.total_in+= copy_this;
- zi->ci.stream.total_out+= copy_this;
- zi->ci.pos_in_buffered_data += copy_this;
- }
- }
- }// while(...)
- }
-
- return err;
-}
-
-extern int ZEXPORT zipCloseFileInZipRaw (zipFile file, uLong uncompressed_size, uLong crc32)
-{
- return zipCloseFileInZipRaw64 (file, uncompressed_size, crc32);
-}
-
-extern int ZEXPORT zipCloseFileInZipRaw64 (zipFile file, ZPOS64_T uncompressed_size, uLong crc32)
-{
- zip64_internal* zi;
- ZPOS64_T compressed_size;
- uLong invalidValue = 0xffffffff;
- short datasize = 0;
- int err=ZIP_OK;
-
- if (file == NULL)
- return ZIP_PARAMERROR;
- zi = (zip64_internal*)file;
-
- if (zi->in_opened_file_inzip == 0)
- return ZIP_PARAMERROR;
- zi->ci.stream.avail_in = 0;
-
- if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))
- {
- while (err==ZIP_OK)
- {
- uLong uTotalOutBefore;
- if (zi->ci.stream.avail_out == 0)
- {
- if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO)
- err = ZIP_ERRNO;
- zi->ci.stream.avail_out = (uInt)Z_BUFSIZE;
- zi->ci.stream.next_out = zi->ci.buffered_data;
- }
- uTotalOutBefore = zi->ci.stream.total_out;
- err=deflate(&zi->ci.stream, Z_FINISH);
- zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ;
- }
- }
- else if ((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw))
- {
-#ifdef HAVE_BZIP2
- err = BZ_FINISH_OK;
- while (err==BZ_FINISH_OK)
- {
- uLong uTotalOutBefore;
- if (zi->ci.bstream.avail_out == 0)
- {
- if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO)
- err = ZIP_ERRNO;
- zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE;
- zi->ci.bstream.next_out = (char*)zi->ci.buffered_data;
- }
- uTotalOutBefore = zi->ci.bstream.total_out_lo32;
- err=BZ2_bzCompress(&zi->ci.bstream, BZ_FINISH);
- if(err == BZ_STREAM_END)
- err = Z_STREAM_END;
-
- zi->ci.pos_in_buffered_data += (uInt)(zi->ci.bstream.total_out_lo32 - uTotalOutBefore);
- }
-
- if(err == BZ_FINISH_OK)
- err = ZIP_OK;
-#endif
- }
-
- if (err==Z_STREAM_END)
- err=ZIP_OK; /* this is normal */
-
- if ((zi->ci.pos_in_buffered_data>0) && (err==ZIP_OK))
- {
- if (zip64FlushWriteBuffer(zi)==ZIP_ERRNO)
- err = ZIP_ERRNO;
- }
-
- if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))
- {
- int tmp_err = deflateEnd(&zi->ci.stream);
- if (err == ZIP_OK)
- err = tmp_err;
- zi->ci.stream_initialised = 0;
- }
-#ifdef HAVE_BZIP2
- else if((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw))
- {
- int tmperr = BZ2_bzCompressEnd(&zi->ci.bstream);
- if (err==ZIP_OK)
- err = tmperr;
- zi->ci.stream_initialised = 0;
- }
-#endif
-
- if (!zi->ci.raw)
- {
- crc32 = (uLong)zi->ci.crc32;
- uncompressed_size = zi->ci.totalUncompressedData;
- }
- compressed_size = zi->ci.totalCompressedData;
-
-# ifndef NOCRYPT
- compressed_size += zi->ci.crypt_header_size;
-# endif
-
- // update Current Item crc and sizes,
- if(compressed_size >= 0xffffffff || uncompressed_size >= 0xffffffff || zi->ci.pos_local_header >= 0xffffffff)
- {
- /*version Made by*/
- zip64local_putValue_inmemory(zi->ci.central_header+4,(uLong)45,2);
- /*version needed*/
- zip64local_putValue_inmemory(zi->ci.central_header+6,(uLong)45,2);
-
- }
-
- zip64local_putValue_inmemory(zi->ci.central_header+16,crc32,4); /*crc*/
-
-
- if(compressed_size >= 0xffffffff)
- zip64local_putValue_inmemory(zi->ci.central_header+20, invalidValue,4); /*compr size*/
- else
- zip64local_putValue_inmemory(zi->ci.central_header+20, compressed_size,4); /*compr size*/
-
- /// set internal file attributes field
- if (zi->ci.stream.data_type == Z_ASCII)
- zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)Z_ASCII,2);
-
- if(uncompressed_size >= 0xffffffff)
- zip64local_putValue_inmemory(zi->ci.central_header+24, invalidValue,4); /*uncompr size*/
- else
- zip64local_putValue_inmemory(zi->ci.central_header+24, uncompressed_size,4); /*uncompr size*/
-
- // Add ZIP64 extra info field for uncompressed size
- if(uncompressed_size >= 0xffffffff)
- datasize += 8;
-
- // Add ZIP64 extra info field for compressed size
- if(compressed_size >= 0xffffffff)
- datasize += 8;
-
- // Add ZIP64 extra info field for relative offset to local file header of current file
- if(zi->ci.pos_local_header >= 0xffffffff)
- datasize += 8;
-
- if(datasize > 0)
- {
- char* p = NULL;
-
- if((uLong)(datasize + 4) > zi->ci.size_centralExtraFree)
- {
- // we can not write more data to the buffer that we have room for.
- return ZIP_BADZIPFILE;
- }
-
- p = zi->ci.central_header + zi->ci.size_centralheader;
-
- // Add Extra Information Header for 'ZIP64 information'
- zip64local_putValue_inmemory(p, 0x0001, 2); // HeaderID
- p += 2;
- zip64local_putValue_inmemory(p, datasize, 2); // DataSize
- p += 2;
-
- if(uncompressed_size >= 0xffffffff)
- {
- zip64local_putValue_inmemory(p, uncompressed_size, 8);
- p += 8;
- }
-
- if(compressed_size >= 0xffffffff)
- {
- zip64local_putValue_inmemory(p, compressed_size, 8);
- p += 8;
- }
-
- if(zi->ci.pos_local_header >= 0xffffffff)
- {
- zip64local_putValue_inmemory(p, zi->ci.pos_local_header, 8);
- p += 8;
- }
-
- // Update how much extra free space we got in the memory buffer
- // and increase the centralheader size so the new ZIP64 fields are included
- // ( 4 below is the size of HeaderID and DataSize field )
- zi->ci.size_centralExtraFree -= datasize + 4;
- zi->ci.size_centralheader += datasize + 4;
-
- // Update the extra info size field
- zi->ci.size_centralExtra += datasize + 4;
- zip64local_putValue_inmemory(zi->ci.central_header+30,(uLong)zi->ci.size_centralExtra,2);
- }
-
- if (err==ZIP_OK)
- err = add_data_in_datablock(&zi->central_dir, zi->ci.central_header, (uLong)zi->ci.size_centralheader);
-
- free(zi->ci.central_header);
-
- if (err==ZIP_OK)
- {
- // Update the LocalFileHeader with the new values.
-
- ZPOS64_T cur_pos_inzip = ZTELL64(zi->z_filefunc,zi->filestream);
-
- if (ZSEEK64(zi->z_filefunc,zi->filestream, zi->ci.pos_local_header + 14,ZLIB_FILEFUNC_SEEK_SET)!=0)
- err = ZIP_ERRNO;
-
- if (err==ZIP_OK)
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,crc32,4); /* crc 32, unknown */
-
- if(uncompressed_size >= 0xffffffff || compressed_size >= 0xffffffff )
- {
- if(zi->ci.pos_zip64extrainfo > 0)
- {
- // Update the size in the ZIP64 extended field.
- if (ZSEEK64(zi->z_filefunc,zi->filestream, zi->ci.pos_zip64extrainfo + 4,ZLIB_FILEFUNC_SEEK_SET)!=0)
- err = ZIP_ERRNO;
-
- if (err==ZIP_OK) /* compressed size, unknown */
- err = zip64local_putValue(&zi->z_filefunc, zi->filestream, uncompressed_size, 8);
-
- if (err==ZIP_OK) /* uncompressed size, unknown */
- err = zip64local_putValue(&zi->z_filefunc, zi->filestream, compressed_size, 8);
- }
- else
- err = ZIP_BADZIPFILE; // Caller passed zip64 = 0, so no room for zip64 info -> fatal
- }
- else
- {
- if (err==ZIP_OK) /* compressed size, unknown */
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,compressed_size,4);
-
- if (err==ZIP_OK) /* uncompressed size, unknown */
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,uncompressed_size,4);
- }
-
- if (ZSEEK64(zi->z_filefunc,zi->filestream, cur_pos_inzip,ZLIB_FILEFUNC_SEEK_SET)!=0)
- err = ZIP_ERRNO;
- }
-
- zi->number_entry ++;
- zi->in_opened_file_inzip = 0;
-
- return err;
-}
-
-extern int ZEXPORT zipCloseFileInZip (zipFile file)
-{
- return zipCloseFileInZipRaw (file,0,0);
-}
-
-int Write_Zip64EndOfCentralDirectoryLocator(zip64_internal* zi, ZPOS64_T zip64eocd_pos_inzip)
-{
- int err = ZIP_OK;
- ZPOS64_T pos = zip64eocd_pos_inzip - zi->add_position_when_writting_offset;
-
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ZIP64ENDLOCHEADERMAGIC,4);
-
- /*num disks*/
- if (err==ZIP_OK) /* number of the disk with the start of the central directory */
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4);
-
- /*relative offset*/
- if (err==ZIP_OK) /* Relative offset to the Zip64EndOfCentralDirectory */
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream, pos,8);
-
- /*total disks*/ /* Do not support spawning of disk so always say 1 here*/
- if (err==ZIP_OK) /* number of the disk with the start of the central directory */
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)1,4);
-
- return err;
-}
-
-int Write_Zip64EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip)
-{
- int err = ZIP_OK;
-
- uLong Zip64DataSize = 44;
-
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ZIP64ENDHEADERMAGIC,4);
-
- if (err==ZIP_OK) /* size of this 'zip64 end of central directory' */
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(ZPOS64_T)Zip64DataSize,8); // why ZPOS64_T of this ?
-
- if (err==ZIP_OK) /* version made by */
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2);
-
- if (err==ZIP_OK) /* version needed */
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2);
-
- if (err==ZIP_OK) /* number of this disk */
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4);
-
- if (err==ZIP_OK) /* number of the disk with the start of the central directory */
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4);
-
- if (err==ZIP_OK) /* total number of entries in the central dir on this disk */
- err = zip64local_putValue(&zi->z_filefunc, zi->filestream, zi->number_entry, 8);
-
- if (err==ZIP_OK) /* total number of entries in the central dir */
- err = zip64local_putValue(&zi->z_filefunc, zi->filestream, zi->number_entry, 8);
-
- if (err==ZIP_OK) /* size of the central directory */
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(ZPOS64_T)size_centraldir,8);
-
- if (err==ZIP_OK) /* offset of start of central directory with respect to the starting disk number */
- {
- ZPOS64_T pos = centraldir_pos_inzip - zi->add_position_when_writting_offset;
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (ZPOS64_T)pos,8);
- }
- return err;
-}
-int Write_EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip)
-{
- int err = ZIP_OK;
-
- /*signature*/
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ENDHEADERMAGIC,4);
-
- if (err==ZIP_OK) /* number of this disk */
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2);
-
- if (err==ZIP_OK) /* number of the disk with the start of the central directory */
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2);
-
- if (err==ZIP_OK) /* total number of entries in the central dir on this disk */
- {
- {
- if(zi->number_entry >= 0xFFFF)
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xffff,2); // use value in ZIP64 record
- else
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2);
- }
- }
-
- if (err==ZIP_OK) /* total number of entries in the central dir */
- {
- if(zi->number_entry >= 0xFFFF)
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xffff,2); // use value in ZIP64 record
- else
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2);
- }
-
- if (err==ZIP_OK) /* size of the central directory */
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_centraldir,4);
-
- if (err==ZIP_OK) /* offset of start of central directory with respect to the starting disk number */
- {
- ZPOS64_T pos = centraldir_pos_inzip - zi->add_position_when_writting_offset;
- if(pos >= 0xffffffff)
- {
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (uLong)0xffffffff,4);
- }
- else
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (uLong)(centraldir_pos_inzip - zi->add_position_when_writting_offset),4);
- }
-
- return err;
-}
-
-int Write_GlobalComment(zip64_internal* zi, const char* global_comment)
-{
- int err = ZIP_OK;
- uInt size_global_comment = 0;
-
- if(global_comment != NULL)
- size_global_comment = (uInt)strlen(global_comment);
-
- err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_global_comment,2);
-
- if (err == ZIP_OK && size_global_comment > 0)
- {
- if (ZWRITE64(zi->z_filefunc,zi->filestream, global_comment, size_global_comment) != size_global_comment)
- err = ZIP_ERRNO;
- }
- return err;
-}
-
-extern int ZEXPORT zipClose (zipFile file, const char* global_comment)
-{
- zip64_internal* zi;
- int err = 0;
- uLong size_centraldir = 0;
- ZPOS64_T centraldir_pos_inzip;
- ZPOS64_T pos;
-
- if (file == NULL)
- return ZIP_PARAMERROR;
-
- zi = (zip64_internal*)file;
-
- if (zi->in_opened_file_inzip == 1)
- {
- err = zipCloseFileInZip (file);
- }
-
-#ifndef NO_ADDFILEINEXISTINGZIP
- if (global_comment==NULL)
- global_comment = zi->globalcomment;
-#endif
-
- centraldir_pos_inzip = ZTELL64(zi->z_filefunc,zi->filestream);
-
- if (err==ZIP_OK)
- {
- linkedlist_datablock_internal* ldi = zi->central_dir.first_block;
- while (ldi!=NULL)
- {
- if ((err==ZIP_OK) && (ldi->filled_in_this_block>0))
- {
- if (ZWRITE64(zi->z_filefunc,zi->filestream, ldi->data, ldi->filled_in_this_block) != ldi->filled_in_this_block)
- err = ZIP_ERRNO;
- }
-
- size_centraldir += ldi->filled_in_this_block;
- ldi = ldi->next_datablock;
- }
- }
- free_linkedlist(&(zi->central_dir));
-
- pos = centraldir_pos_inzip - zi->add_position_when_writting_offset;
- if(pos >= 0xffffffff || zi->number_entry > 0xFFFF)
- {
- ZPOS64_T Zip64EOCDpos = ZTELL64(zi->z_filefunc,zi->filestream);
- Write_Zip64EndOfCentralDirectoryRecord(zi, size_centraldir, centraldir_pos_inzip);
-
- Write_Zip64EndOfCentralDirectoryLocator(zi, Zip64EOCDpos);
- }
-
- if (err==ZIP_OK)
- err = Write_EndOfCentralDirectoryRecord(zi, size_centraldir, centraldir_pos_inzip);
-
- if(err == ZIP_OK)
- err = Write_GlobalComment(zi, global_comment);
-
- if (ZCLOSE64(zi->z_filefunc,zi->filestream) != 0)
- if (err == ZIP_OK)
- err = ZIP_ERRNO;
-
-#ifndef NO_ADDFILEINEXISTINGZIP
- TRYFREE(zi->globalcomment);
-#endif
- TRYFREE(zi);
-
- return err;
-}
-
-extern int ZEXPORT zipRemoveExtraInfoBlock (char* pData, int* dataLen, short sHeader)
-{
- char* p = pData;
- int size = 0;
- char* pNewHeader;
- char* pTmp;
- short header;
- short dataSize;
-
- int retVal = ZIP_OK;
-
- if(pData == NULL || *dataLen < 4)
- return ZIP_PARAMERROR;
-
- pNewHeader = (char*)ALLOC(*dataLen);
- pTmp = pNewHeader;
-
- while(p < (pData + *dataLen))
- {
- header = *(short*)p;
- dataSize = *(((short*)p)+1);
-
- if( header == sHeader ) // Header found.
- {
- p += dataSize + 4; // skip it. do not copy to temp buffer
- }
- else
- {
- // Extra Info block should not be removed, So copy it to the temp buffer.
- memcpy(pTmp, p, dataSize + 4);
- p += dataSize + 4;
- size += dataSize + 4;
- }
-
- }
-
- if(size < *dataLen)
- {
- // clean old extra info block.
- memset(pData,0, *dataLen);
-
- // copy the new extra info block over the old
- if(size > 0)
- memcpy(pData, pNewHeader, size);
-
- // set the new extra info size
- *dataLen = size;
-
- retVal = ZIP_OK;
- }
- else
- retVal = ZIP_ERRNO;
-
- TRYFREE(pNewHeader);
-
- return retVal;
-}
[21/51] [partial] orc git commit: ORC-204 Update and use CMake
External Project to build C++ compression libraries.
Posted by om...@apache.org.
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/infback9/infback9.c
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/infback9/infback9.c b/c++/libs/zlib-1.2.8/contrib/infback9/infback9.c
deleted file mode 100644
index 05fb3e3..0000000
--- a/c++/libs/zlib-1.2.8/contrib/infback9/infback9.c
+++ /dev/null
@@ -1,615 +0,0 @@
-/* infback9.c -- inflate deflate64 data using a call-back interface
- * Copyright (C) 1995-2008 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-#include "zutil.h"
-#include "infback9.h"
-#include "inftree9.h"
-#include "inflate9.h"
-
-#define WSIZE 65536UL
-
-/*
- strm provides memory allocation functions in zalloc and zfree, or
- Z_NULL to use the library memory allocation functions.
-
- window is a user-supplied window and output buffer that is 64K bytes.
- */
-int ZEXPORT inflateBack9Init_(strm, window, version, stream_size)
-z_stream FAR *strm;
-unsigned char FAR *window;
-const char *version;
-int stream_size;
-{
- struct inflate_state FAR *state;
-
- if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
- stream_size != (int)(sizeof(z_stream)))
- return Z_VERSION_ERROR;
- if (strm == Z_NULL || window == Z_NULL)
- return Z_STREAM_ERROR;
- strm->msg = Z_NULL; /* in case we return an error */
- if (strm->zalloc == (alloc_func)0) {
- strm->zalloc = zcalloc;
- strm->opaque = (voidpf)0;
- }
- if (strm->zfree == (free_func)0) strm->zfree = zcfree;
- state = (struct inflate_state FAR *)ZALLOC(strm, 1,
- sizeof(struct inflate_state));
- if (state == Z_NULL) return Z_MEM_ERROR;
- Tracev((stderr, "inflate: allocated\n"));
- strm->state = (voidpf)state;
- state->window = window;
- return Z_OK;
-}
-
-/*
- Build and output length and distance decoding tables for fixed code
- decoding.
- */
-#ifdef MAKEFIXED
-#include <stdio.h>
-
-void makefixed9(void)
-{
- unsigned sym, bits, low, size;
- code *next, *lenfix, *distfix;
- struct inflate_state state;
- code fixed[544];
-
- /* literal/length table */
- sym = 0;
- while (sym < 144) state.lens[sym++] = 8;
- while (sym < 256) state.lens[sym++] = 9;
- while (sym < 280) state.lens[sym++] = 7;
- while (sym < 288) state.lens[sym++] = 8;
- next = fixed;
- lenfix = next;
- bits = 9;
- inflate_table9(LENS, state.lens, 288, &(next), &(bits), state.work);
-
- /* distance table */
- sym = 0;
- while (sym < 32) state.lens[sym++] = 5;
- distfix = next;
- bits = 5;
- inflate_table9(DISTS, state.lens, 32, &(next), &(bits), state.work);
-
- /* write tables */
- puts(" /* inffix9.h -- table for decoding deflate64 fixed codes");
- puts(" * Generated automatically by makefixed9().");
- puts(" */");
- puts("");
- puts(" /* WARNING: this file should *not* be used by applications.");
- puts(" It is part of the implementation of this library and is");
- puts(" subject to change. Applications should only use zlib.h.");
- puts(" */");
- puts("");
- size = 1U << 9;
- printf(" static const code lenfix[%u] = {", size);
- low = 0;
- for (;;) {
- if ((low % 6) == 0) printf("\n ");
- printf("{%u,%u,%d}", lenfix[low].op, lenfix[low].bits,
- lenfix[low].val);
- if (++low == size) break;
- putchar(',');
- }
- puts("\n };");
- size = 1U << 5;
- printf("\n static const code distfix[%u] = {", size);
- low = 0;
- for (;;) {
- if ((low % 5) == 0) printf("\n ");
- printf("{%u,%u,%d}", distfix[low].op, distfix[low].bits,
- distfix[low].val);
- if (++low == size) break;
- putchar(',');
- }
- puts("\n };");
-}
-#endif /* MAKEFIXED */
-
-/* Macros for inflateBack(): */
-
-/* Clear the input bit accumulator */
-#define INITBITS() \
- do { \
- hold = 0; \
- bits = 0; \
- } while (0)
-
-/* Assure that some input is available. If input is requested, but denied,
- then return a Z_BUF_ERROR from inflateBack(). */
-#define PULL() \
- do { \
- if (have == 0) { \
- have = in(in_desc, &next); \
- if (have == 0) { \
- next = Z_NULL; \
- ret = Z_BUF_ERROR; \
- goto inf_leave; \
- } \
- } \
- } while (0)
-
-/* Get a byte of input into the bit accumulator, or return from inflateBack()
- with an error if there is no input available. */
-#define PULLBYTE() \
- do { \
- PULL(); \
- have--; \
- hold += (unsigned long)(*next++) << bits; \
- bits += 8; \
- } while (0)
-
-/* Assure that there are at least n bits in the bit accumulator. If there is
- not enough available input to do that, then return from inflateBack() with
- an error. */
-#define NEEDBITS(n) \
- do { \
- while (bits < (unsigned)(n)) \
- PULLBYTE(); \
- } while (0)
-
-/* Return the low n bits of the bit accumulator (n <= 16) */
-#define BITS(n) \
- ((unsigned)hold & ((1U << (n)) - 1))
-
-/* Remove n bits from the bit accumulator */
-#define DROPBITS(n) \
- do { \
- hold >>= (n); \
- bits -= (unsigned)(n); \
- } while (0)
-
-/* Remove zero to seven bits as needed to go to a byte boundary */
-#define BYTEBITS() \
- do { \
- hold >>= bits & 7; \
- bits -= bits & 7; \
- } while (0)
-
-/* Assure that some output space is available, by writing out the window
- if it's full. If the write fails, return from inflateBack() with a
- Z_BUF_ERROR. */
-#define ROOM() \
- do { \
- if (left == 0) { \
- put = window; \
- left = WSIZE; \
- wrap = 1; \
- if (out(out_desc, put, (unsigned)left)) { \
- ret = Z_BUF_ERROR; \
- goto inf_leave; \
- } \
- } \
- } while (0)
-
-/*
- strm provides the memory allocation functions and window buffer on input,
- and provides information on the unused input on return. For Z_DATA_ERROR
- returns, strm will also provide an error message.
-
- in() and out() are the call-back input and output functions. When
- inflateBack() needs more input, it calls in(). When inflateBack() has
- filled the window with output, or when it completes with data in the
- window, it calls out() to write out the data. The application must not
- change the provided input until in() is called again or inflateBack()
- returns. The application must not change the window/output buffer until
- inflateBack() returns.
-
- in() and out() are called with a descriptor parameter provided in the
- inflateBack() call. This parameter can be a structure that provides the
- information required to do the read or write, as well as accumulated
- information on the input and output such as totals and check values.
-
- in() should return zero on failure. out() should return non-zero on
- failure. If either in() or out() fails, than inflateBack() returns a
- Z_BUF_ERROR. strm->next_in can be checked for Z_NULL to see whether it
- was in() or out() that caused in the error. Otherwise, inflateBack()
- returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format
- error, or Z_MEM_ERROR if it could not allocate memory for the state.
- inflateBack() can also return Z_STREAM_ERROR if the input parameters
- are not correct, i.e. strm is Z_NULL or the state was not initialized.
- */
-int ZEXPORT inflateBack9(strm, in, in_desc, out, out_desc)
-z_stream FAR *strm;
-in_func in;
-void FAR *in_desc;
-out_func out;
-void FAR *out_desc;
-{
- struct inflate_state FAR *state;
- z_const unsigned char FAR *next; /* next input */
- unsigned char FAR *put; /* next output */
- unsigned have; /* available input */
- unsigned long left; /* available output */
- inflate_mode mode; /* current inflate mode */
- int lastblock; /* true if processing last block */
- int wrap; /* true if the window has wrapped */
- unsigned char FAR *window; /* allocated sliding window, if needed */
- unsigned long hold; /* bit buffer */
- unsigned bits; /* bits in bit buffer */
- unsigned extra; /* extra bits needed */
- unsigned long length; /* literal or length of data to copy */
- unsigned long offset; /* distance back to copy string from */
- unsigned long copy; /* number of stored or match bytes to copy */
- unsigned char FAR *from; /* where to copy match bytes from */
- code const FAR *lencode; /* starting table for length/literal codes */
- code const FAR *distcode; /* starting table for distance codes */
- unsigned lenbits; /* index bits for lencode */
- unsigned distbits; /* index bits for distcode */
- code here; /* current decoding table entry */
- code last; /* parent table entry */
- unsigned len; /* length to copy for repeats, bits to drop */
- int ret; /* return code */
- static const unsigned short order[19] = /* permutation of code lengths */
- {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
-#include "inffix9.h"
-
- /* Check that the strm exists and that the state was initialized */
- if (strm == Z_NULL || strm->state == Z_NULL)
- return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
-
- /* Reset the state */
- strm->msg = Z_NULL;
- mode = TYPE;
- lastblock = 0;
- wrap = 0;
- window = state->window;
- next = strm->next_in;
- have = next != Z_NULL ? strm->avail_in : 0;
- hold = 0;
- bits = 0;
- put = window;
- left = WSIZE;
- lencode = Z_NULL;
- distcode = Z_NULL;
-
- /* Inflate until end of block marked as last */
- for (;;)
- switch (mode) {
- case TYPE:
- /* determine and dispatch block type */
- if (lastblock) {
- BYTEBITS();
- mode = DONE;
- break;
- }
- NEEDBITS(3);
- lastblock = BITS(1);
- DROPBITS(1);
- switch (BITS(2)) {
- case 0: /* stored block */
- Tracev((stderr, "inflate: stored block%s\n",
- lastblock ? " (last)" : ""));
- mode = STORED;
- break;
- case 1: /* fixed block */
- lencode = lenfix;
- lenbits = 9;
- distcode = distfix;
- distbits = 5;
- Tracev((stderr, "inflate: fixed codes block%s\n",
- lastblock ? " (last)" : ""));
- mode = LEN; /* decode codes */
- break;
- case 2: /* dynamic block */
- Tracev((stderr, "inflate: dynamic codes block%s\n",
- lastblock ? " (last)" : ""));
- mode = TABLE;
- break;
- case 3:
- strm->msg = (char *)"invalid block type";
- mode = BAD;
- }
- DROPBITS(2);
- break;
-
- case STORED:
- /* get and verify stored block length */
- BYTEBITS(); /* go to byte boundary */
- NEEDBITS(32);
- if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) {
- strm->msg = (char *)"invalid stored block lengths";
- mode = BAD;
- break;
- }
- length = (unsigned)hold & 0xffff;
- Tracev((stderr, "inflate: stored length %lu\n",
- length));
- INITBITS();
-
- /* copy stored block from input to output */
- while (length != 0) {
- copy = length;
- PULL();
- ROOM();
- if (copy > have) copy = have;
- if (copy > left) copy = left;
- zmemcpy(put, next, copy);
- have -= copy;
- next += copy;
- left -= copy;
- put += copy;
- length -= copy;
- }
- Tracev((stderr, "inflate: stored end\n"));
- mode = TYPE;
- break;
-
- case TABLE:
- /* get dynamic table entries descriptor */
- NEEDBITS(14);
- state->nlen = BITS(5) + 257;
- DROPBITS(5);
- state->ndist = BITS(5) + 1;
- DROPBITS(5);
- state->ncode = BITS(4) + 4;
- DROPBITS(4);
- if (state->nlen > 286) {
- strm->msg = (char *)"too many length symbols";
- mode = BAD;
- break;
- }
- Tracev((stderr, "inflate: table sizes ok\n"));
-
- /* get code length code lengths (not a typo) */
- state->have = 0;
- while (state->have < state->ncode) {
- NEEDBITS(3);
- state->lens[order[state->have++]] = (unsigned short)BITS(3);
- DROPBITS(3);
- }
- while (state->have < 19)
- state->lens[order[state->have++]] = 0;
- state->next = state->codes;
- lencode = (code const FAR *)(state->next);
- lenbits = 7;
- ret = inflate_table9(CODES, state->lens, 19, &(state->next),
- &(lenbits), state->work);
- if (ret) {
- strm->msg = (char *)"invalid code lengths set";
- mode = BAD;
- break;
- }
- Tracev((stderr, "inflate: code lengths ok\n"));
-
- /* get length and distance code code lengths */
- state->have = 0;
- while (state->have < state->nlen + state->ndist) {
- for (;;) {
- here = lencode[BITS(lenbits)];
- if ((unsigned)(here.bits) <= bits) break;
- PULLBYTE();
- }
- if (here.val < 16) {
- NEEDBITS(here.bits);
- DROPBITS(here.bits);
- state->lens[state->have++] = here.val;
- }
- else {
- if (here.val == 16) {
- NEEDBITS(here.bits + 2);
- DROPBITS(here.bits);
- if (state->have == 0) {
- strm->msg = (char *)"invalid bit length repeat";
- mode = BAD;
- break;
- }
- len = (unsigned)(state->lens[state->have - 1]);
- copy = 3 + BITS(2);
- DROPBITS(2);
- }
- else if (here.val == 17) {
- NEEDBITS(here.bits + 3);
- DROPBITS(here.bits);
- len = 0;
- copy = 3 + BITS(3);
- DROPBITS(3);
- }
- else {
- NEEDBITS(here.bits + 7);
- DROPBITS(here.bits);
- len = 0;
- copy = 11 + BITS(7);
- DROPBITS(7);
- }
- if (state->have + copy > state->nlen + state->ndist) {
- strm->msg = (char *)"invalid bit length repeat";
- mode = BAD;
- break;
- }
- while (copy--)
- state->lens[state->have++] = (unsigned short)len;
- }
- }
-
- /* handle error breaks in while */
- if (mode == BAD) break;
-
- /* check for end-of-block code (better have one) */
- if (state->lens[256] == 0) {
- strm->msg = (char *)"invalid code -- missing end-of-block";
- mode = BAD;
- break;
- }
-
- /* build code tables -- note: do not change the lenbits or distbits
- values here (9 and 6) without reading the comments in inftree9.h
- concerning the ENOUGH constants, which depend on those values */
- state->next = state->codes;
- lencode = (code const FAR *)(state->next);
- lenbits = 9;
- ret = inflate_table9(LENS, state->lens, state->nlen,
- &(state->next), &(lenbits), state->work);
- if (ret) {
- strm->msg = (char *)"invalid literal/lengths set";
- mode = BAD;
- break;
- }
- distcode = (code const FAR *)(state->next);
- distbits = 6;
- ret = inflate_table9(DISTS, state->lens + state->nlen,
- state->ndist, &(state->next), &(distbits),
- state->work);
- if (ret) {
- strm->msg = (char *)"invalid distances set";
- mode = BAD;
- break;
- }
- Tracev((stderr, "inflate: codes ok\n"));
- mode = LEN;
-
- case LEN:
- /* get a literal, length, or end-of-block code */
- for (;;) {
- here = lencode[BITS(lenbits)];
- if ((unsigned)(here.bits) <= bits) break;
- PULLBYTE();
- }
- if (here.op && (here.op & 0xf0) == 0) {
- last = here;
- for (;;) {
- here = lencode[last.val +
- (BITS(last.bits + last.op) >> last.bits)];
- if ((unsigned)(last.bits + here.bits) <= bits) break;
- PULLBYTE();
- }
- DROPBITS(last.bits);
- }
- DROPBITS(here.bits);
- length = (unsigned)here.val;
-
- /* process literal */
- if (here.op == 0) {
- Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
- "inflate: literal '%c'\n" :
- "inflate: literal 0x%02x\n", here.val));
- ROOM();
- *put++ = (unsigned char)(length);
- left--;
- mode = LEN;
- break;
- }
-
- /* process end of block */
- if (here.op & 32) {
- Tracevv((stderr, "inflate: end of block\n"));
- mode = TYPE;
- break;
- }
-
- /* invalid code */
- if (here.op & 64) {
- strm->msg = (char *)"invalid literal/length code";
- mode = BAD;
- break;
- }
-
- /* length code -- get extra bits, if any */
- extra = (unsigned)(here.op) & 31;
- if (extra != 0) {
- NEEDBITS(extra);
- length += BITS(extra);
- DROPBITS(extra);
- }
- Tracevv((stderr, "inflate: length %lu\n", length));
-
- /* get distance code */
- for (;;) {
- here = distcode[BITS(distbits)];
- if ((unsigned)(here.bits) <= bits) break;
- PULLBYTE();
- }
- if ((here.op & 0xf0) == 0) {
- last = here;
- for (;;) {
- here = distcode[last.val +
- (BITS(last.bits + last.op) >> last.bits)];
- if ((unsigned)(last.bits + here.bits) <= bits) break;
- PULLBYTE();
- }
- DROPBITS(last.bits);
- }
- DROPBITS(here.bits);
- if (here.op & 64) {
- strm->msg = (char *)"invalid distance code";
- mode = BAD;
- break;
- }
- offset = (unsigned)here.val;
-
- /* get distance extra bits, if any */
- extra = (unsigned)(here.op) & 15;
- if (extra != 0) {
- NEEDBITS(extra);
- offset += BITS(extra);
- DROPBITS(extra);
- }
- if (offset > WSIZE - (wrap ? 0: left)) {
- strm->msg = (char *)"invalid distance too far back";
- mode = BAD;
- break;
- }
- Tracevv((stderr, "inflate: distance %lu\n", offset));
-
- /* copy match from window to output */
- do {
- ROOM();
- copy = WSIZE - offset;
- if (copy < left) {
- from = put + copy;
- copy = left - copy;
- }
- else {
- from = put - offset;
- copy = left;
- }
- if (copy > length) copy = length;
- length -= copy;
- left -= copy;
- do {
- *put++ = *from++;
- } while (--copy);
- } while (length != 0);
- break;
-
- case DONE:
- /* inflate stream terminated properly -- write leftover output */
- ret = Z_STREAM_END;
- if (left < WSIZE) {
- if (out(out_desc, window, (unsigned)(WSIZE - left)))
- ret = Z_BUF_ERROR;
- }
- goto inf_leave;
-
- case BAD:
- ret = Z_DATA_ERROR;
- goto inf_leave;
-
- default: /* can't happen, but makes compilers happy */
- ret = Z_STREAM_ERROR;
- goto inf_leave;
- }
-
- /* Return unused input */
- inf_leave:
- strm->next_in = next;
- strm->avail_in = have;
- return ret;
-}
-
-int ZEXPORT inflateBack9End(strm)
-z_stream FAR *strm;
-{
- if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
- return Z_STREAM_ERROR;
- ZFREE(strm, strm->state);
- strm->state = Z_NULL;
- Tracev((stderr, "inflate: end\n"));
- return Z_OK;
-}
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/infback9/infback9.h
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/infback9/infback9.h b/c++/libs/zlib-1.2.8/contrib/infback9/infback9.h
deleted file mode 100644
index 1073c0a..0000000
--- a/c++/libs/zlib-1.2.8/contrib/infback9/infback9.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* infback9.h -- header for using inflateBack9 functions
- * Copyright (C) 2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
- * This header file and associated patches provide a decoder for PKWare's
- * undocumented deflate64 compression method (method 9). Use with infback9.c,
- * inftree9.h, inftree9.c, and inffix9.h. These patches are not supported.
- * This should be compiled with zlib, since it uses zutil.h and zutil.o.
- * This code has not yet been tested on 16-bit architectures. See the
- * comments in zlib.h for inflateBack() usage. These functions are used
- * identically, except that there is no windowBits parameter, and a 64K
- * window must be provided. Also if int's are 16 bits, then a zero for
- * the third parameter of the "out" function actually means 65536UL.
- * zlib.h must be included before this header file.
- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-ZEXTERN int ZEXPORT inflateBack9 OF((z_stream FAR *strm,
- in_func in, void FAR *in_desc,
- out_func out, void FAR *out_desc));
-ZEXTERN int ZEXPORT inflateBack9End OF((z_stream FAR *strm));
-ZEXTERN int ZEXPORT inflateBack9Init_ OF((z_stream FAR *strm,
- unsigned char FAR *window,
- const char *version,
- int stream_size));
-#define inflateBack9Init(strm, window) \
- inflateBack9Init_((strm), (window), \
- ZLIB_VERSION, sizeof(z_stream))
-
-#ifdef __cplusplus
-}
-#endif
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/infback9/inffix9.h
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/infback9/inffix9.h b/c++/libs/zlib-1.2.8/contrib/infback9/inffix9.h
deleted file mode 100644
index ee5671d..0000000
--- a/c++/libs/zlib-1.2.8/contrib/infback9/inffix9.h
+++ /dev/null
@@ -1,107 +0,0 @@
- /* inffix9.h -- table for decoding deflate64 fixed codes
- * Generated automatically by makefixed9().
- */
-
- /* WARNING: this file should *not* be used by applications.
- It is part of the implementation of this library and is
- subject to change. Applications should only use zlib.h.
- */
-
- static const code lenfix[512] = {
- {96,7,0},{0,8,80},{0,8,16},{132,8,115},{130,7,31},{0,8,112},
- {0,8,48},{0,9,192},{128,7,10},{0,8,96},{0,8,32},{0,9,160},
- {0,8,0},{0,8,128},{0,8,64},{0,9,224},{128,7,6},{0,8,88},
- {0,8,24},{0,9,144},{131,7,59},{0,8,120},{0,8,56},{0,9,208},
- {129,7,17},{0,8,104},{0,8,40},{0,9,176},{0,8,8},{0,8,136},
- {0,8,72},{0,9,240},{128,7,4},{0,8,84},{0,8,20},{133,8,227},
- {131,7,43},{0,8,116},{0,8,52},{0,9,200},{129,7,13},{0,8,100},
- {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},
- {128,7,8},{0,8,92},{0,8,28},{0,9,152},{132,7,83},{0,8,124},
- {0,8,60},{0,9,216},{130,7,23},{0,8,108},{0,8,44},{0,9,184},
- {0,8,12},{0,8,140},{0,8,76},{0,9,248},{128,7,3},{0,8,82},
- {0,8,18},{133,8,163},{131,7,35},{0,8,114},{0,8,50},{0,9,196},
- {129,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2},{0,8,130},
- {0,8,66},{0,9,228},{128,7,7},{0,8,90},{0,8,26},{0,9,148},
- {132,7,67},{0,8,122},{0,8,58},{0,9,212},{130,7,19},{0,8,106},
- {0,8,42},{0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},
- {128,7,5},{0,8,86},{0,8,22},{65,8,0},{131,7,51},{0,8,118},
- {0,8,54},{0,9,204},{129,7,15},{0,8,102},{0,8,38},{0,9,172},
- {0,8,6},{0,8,134},{0,8,70},{0,9,236},{128,7,9},{0,8,94},
- {0,8,30},{0,9,156},{132,7,99},{0,8,126},{0,8,62},{0,9,220},
- {130,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142},
- {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{133,8,131},
- {130,7,31},{0,8,113},{0,8,49},{0,9,194},{128,7,10},{0,8,97},
- {0,8,33},{0,9,162},{0,8,1},{0,8,129},{0,8,65},{0,9,226},
- {128,7,6},{0,8,89},{0,8,25},{0,9,146},{131,7,59},{0,8,121},
- {0,8,57},{0,9,210},{129,7,17},{0,8,105},{0,8,41},{0,9,178},
- {0,8,9},{0,8,137},{0,8,73},{0,9,242},{128,7,4},{0,8,85},
- {0,8,21},{144,8,3},{131,7,43},{0,8,117},{0,8,53},{0,9,202},
- {129,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},
- {0,8,69},{0,9,234},{128,7,8},{0,8,93},{0,8,29},{0,9,154},
- {132,7,83},{0,8,125},{0,8,61},{0,9,218},{130,7,23},{0,8,109},
- {0,8,45},{0,9,186},{0,8,13},{0,8,141},{0,8,77},{0,9,250},
- {128,7,3},{0,8,83},{0,8,19},{133,8,195},{131,7,35},{0,8,115},
- {0,8,51},{0,9,198},{129,7,11},{0,8,99},{0,8,35},{0,9,166},
- {0,8,3},{0,8,131},{0,8,67},{0,9,230},{128,7,7},{0,8,91},
- {0,8,27},{0,9,150},{132,7,67},{0,8,123},{0,8,59},{0,9,214},
- {130,7,19},{0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},
- {0,8,75},{0,9,246},{128,7,5},{0,8,87},{0,8,23},{77,8,0},
- {131,7,51},{0,8,119},{0,8,55},{0,9,206},{129,7,15},{0,8,103},
- {0,8,39},{0,9,174},{0,8,7},{0,8,135},{0,8,71},{0,9,238},
- {128,7,9},{0,8,95},{0,8,31},{0,9,158},{132,7,99},{0,8,127},
- {0,8,63},{0,9,222},{130,7,27},{0,8,111},{0,8,47},{0,9,190},
- {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},
- {0,8,16},{132,8,115},{130,7,31},{0,8,112},{0,8,48},{0,9,193},
- {128,7,10},{0,8,96},{0,8,32},{0,9,161},{0,8,0},{0,8,128},
- {0,8,64},{0,9,225},{128,7,6},{0,8,88},{0,8,24},{0,9,145},
- {131,7,59},{0,8,120},{0,8,56},{0,9,209},{129,7,17},{0,8,104},
- {0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72},{0,9,241},
- {128,7,4},{0,8,84},{0,8,20},{133,8,227},{131,7,43},{0,8,116},
- {0,8,52},{0,9,201},{129,7,13},{0,8,100},{0,8,36},{0,9,169},
- {0,8,4},{0,8,132},{0,8,68},{0,9,233},{128,7,8},{0,8,92},
- {0,8,28},{0,9,153},{132,7,83},{0,8,124},{0,8,60},{0,9,217},
- {130,7,23},{0,8,108},{0,8,44},{0,9,185},{0,8,12},{0,8,140},
- {0,8,76},{0,9,249},{128,7,3},{0,8,82},{0,8,18},{133,8,163},
- {131,7,35},{0,8,114},{0,8,50},{0,9,197},{129,7,11},{0,8,98},
- {0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229},
- {128,7,7},{0,8,90},{0,8,26},{0,9,149},{132,7,67},{0,8,122},
- {0,8,58},{0,9,213},{130,7,19},{0,8,106},{0,8,42},{0,9,181},
- {0,8,10},{0,8,138},{0,8,74},{0,9,245},{128,7,5},{0,8,86},
- {0,8,22},{65,8,0},{131,7,51},{0,8,118},{0,8,54},{0,9,205},
- {129,7,15},{0,8,102},{0,8,38},{0,9,173},{0,8,6},{0,8,134},
- {0,8,70},{0,9,237},{128,7,9},{0,8,94},{0,8,30},{0,9,157},
- {132,7,99},{0,8,126},{0,8,62},{0,9,221},{130,7,27},{0,8,110},
- {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},
- {96,7,0},{0,8,81},{0,8,17},{133,8,131},{130,7,31},{0,8,113},
- {0,8,49},{0,9,195},{128,7,10},{0,8,97},{0,8,33},{0,9,163},
- {0,8,1},{0,8,129},{0,8,65},{0,9,227},{128,7,6},{0,8,89},
- {0,8,25},{0,9,147},{131,7,59},{0,8,121},{0,8,57},{0,9,211},
- {129,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9},{0,8,137},
- {0,8,73},{0,9,243},{128,7,4},{0,8,85},{0,8,21},{144,8,3},
- {131,7,43},{0,8,117},{0,8,53},{0,9,203},{129,7,13},{0,8,101},
- {0,8,37},{0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},
- {128,7,8},{0,8,93},{0,8,29},{0,9,155},{132,7,83},{0,8,125},
- {0,8,61},{0,9,219},{130,7,23},{0,8,109},{0,8,45},{0,9,187},
- {0,8,13},{0,8,141},{0,8,77},{0,9,251},{128,7,3},{0,8,83},
- {0,8,19},{133,8,195},{131,7,35},{0,8,115},{0,8,51},{0,9,199},
- {129,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131},
- {0,8,67},{0,9,231},{128,7,7},{0,8,91},{0,8,27},{0,9,151},
- {132,7,67},{0,8,123},{0,8,59},{0,9,215},{130,7,19},{0,8,107},
- {0,8,43},{0,9,183},{0,8,11},{0,8,139},{0,8,75},{0,9,247},
- {128,7,5},{0,8,87},{0,8,23},{77,8,0},{131,7,51},{0,8,119},
- {0,8,55},{0,9,207},{129,7,15},{0,8,103},{0,8,39},{0,9,175},
- {0,8,7},{0,8,135},{0,8,71},{0,9,239},{128,7,9},{0,8,95},
- {0,8,31},{0,9,159},{132,7,99},{0,8,127},{0,8,63},{0,9,223},
- {130,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},
- {0,8,79},{0,9,255}
- };
-
- static const code distfix[32] = {
- {128,5,1},{135,5,257},{131,5,17},{139,5,4097},{129,5,5},
- {137,5,1025},{133,5,65},{141,5,16385},{128,5,3},{136,5,513},
- {132,5,33},{140,5,8193},{130,5,9},{138,5,2049},{134,5,129},
- {142,5,32769},{128,5,2},{135,5,385},{131,5,25},{139,5,6145},
- {129,5,7},{137,5,1537},{133,5,97},{141,5,24577},{128,5,4},
- {136,5,769},{132,5,49},{140,5,12289},{130,5,13},{138,5,3073},
- {134,5,193},{142,5,49153}
- };
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/infback9/inflate9.h
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/infback9/inflate9.h b/c++/libs/zlib-1.2.8/contrib/infback9/inflate9.h
deleted file mode 100644
index ee9a793..0000000
--- a/c++/libs/zlib-1.2.8/contrib/infback9/inflate9.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* inflate9.h -- internal inflate state definition
- * Copyright (C) 1995-2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
- part of the implementation of the compression library and is
- subject to change. Applications should only use zlib.h.
- */
-
-/* Possible inflate modes between inflate() calls */
-typedef enum {
- TYPE, /* i: waiting for type bits, including last-flag bit */
- STORED, /* i: waiting for stored size (length and complement) */
- TABLE, /* i: waiting for dynamic block table lengths */
- LEN, /* i: waiting for length/lit code */
- DONE, /* finished check, done -- remain here until reset */
- BAD /* got a data error -- remain here until reset */
-} inflate_mode;
-
-/*
- State transitions between above modes -
-
- (most modes can go to the BAD mode -- not shown for clarity)
-
- Read deflate blocks:
- TYPE -> STORED or TABLE or LEN or DONE
- STORED -> TYPE
- TABLE -> LENLENS -> CODELENS -> LEN
- Read deflate codes:
- LEN -> LEN or TYPE
- */
-
-/* state maintained between inflate() calls. Approximately 7K bytes. */
-struct inflate_state {
- /* sliding window */
- unsigned char FAR *window; /* allocated sliding window, if needed */
- /* dynamic table building */
- unsigned ncode; /* number of code length code lengths */
- unsigned nlen; /* number of length code lengths */
- unsigned ndist; /* number of distance code lengths */
- unsigned have; /* number of code lengths in lens[] */
- code FAR *next; /* next available space in codes[] */
- unsigned short lens[320]; /* temporary storage for code lengths */
- unsigned short work[288]; /* work area for code table building */
- code codes[ENOUGH]; /* space for code tables */
-};
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/infback9/inftree9.c
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/infback9/inftree9.c b/c++/libs/zlib-1.2.8/contrib/infback9/inftree9.c
deleted file mode 100644
index 4a73ad2..0000000
--- a/c++/libs/zlib-1.2.8/contrib/infback9/inftree9.c
+++ /dev/null
@@ -1,324 +0,0 @@
-/* inftree9.c -- generate Huffman trees for efficient decoding
- * Copyright (C) 1995-2013 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-#include "zutil.h"
-#include "inftree9.h"
-
-#define MAXBITS 15
-
-const char inflate9_copyright[] =
- " inflate9 1.2.8 Copyright 1995-2013 Mark Adler ";
-/*
- If you use the zlib library in a product, an acknowledgment is welcome
- in the documentation of your product. If for some reason you cannot
- include such an acknowledgment, I would appreciate that you keep this
- copyright string in the executable of your product.
- */
-
-/*
- Build a set of tables to decode the provided canonical Huffman code.
- The code lengths are lens[0..codes-1]. The result starts at *table,
- whose indices are 0..2^bits-1. work is a writable array of at least
- lens shorts, which is used as a work area. type is the type of code
- to be generated, CODES, LENS, or DISTS. On return, zero is success,
- -1 is an invalid code, and +1 means that ENOUGH isn't enough. table
- on return points to the next available entry's address. bits is the
- requested root table index bits, and on return it is the actual root
- table index bits. It will differ if the request is greater than the
- longest code or if it is less than the shortest code.
- */
-int inflate_table9(type, lens, codes, table, bits, work)
-codetype type;
-unsigned short FAR *lens;
-unsigned codes;
-code FAR * FAR *table;
-unsigned FAR *bits;
-unsigned short FAR *work;
-{
- unsigned len; /* a code's length in bits */
- unsigned sym; /* index of code symbols */
- unsigned min, max; /* minimum and maximum code lengths */
- unsigned root; /* number of index bits for root table */
- unsigned curr; /* number of index bits for current table */
- unsigned drop; /* code bits to drop for sub-table */
- int left; /* number of prefix codes available */
- unsigned used; /* code entries in table used */
- unsigned huff; /* Huffman code */
- unsigned incr; /* for incrementing code, index */
- unsigned fill; /* index for replicating entries */
- unsigned low; /* low bits for current root entry */
- unsigned mask; /* mask for low root bits */
- code this; /* table entry for duplication */
- code FAR *next; /* next available space in table */
- const unsigned short FAR *base; /* base value table to use */
- const unsigned short FAR *extra; /* extra bits table to use */
- int end; /* use base and extra for symbol > end */
- unsigned short count[MAXBITS+1]; /* number of codes of each length */
- unsigned short offs[MAXBITS+1]; /* offsets in table for each length */
- static const unsigned short lbase[31] = { /* Length codes 257..285 base */
- 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17,
- 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115,
- 131, 163, 195, 227, 3, 0, 0};
- static const unsigned short lext[31] = { /* Length codes 257..285 extra */
- 128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129,
- 130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132,
- 133, 133, 133, 133, 144, 72, 78};
- static const unsigned short dbase[32] = { /* Distance codes 0..31 base */
- 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49,
- 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073,
- 4097, 6145, 8193, 12289, 16385, 24577, 32769, 49153};
- static const unsigned short dext[32] = { /* Distance codes 0..31 extra */
- 128, 128, 128, 128, 129, 129, 130, 130, 131, 131, 132, 132,
- 133, 133, 134, 134, 135, 135, 136, 136, 137, 137, 138, 138,
- 139, 139, 140, 140, 141, 141, 142, 142};
-
- /*
- Process a set of code lengths to create a canonical Huffman code. The
- code lengths are lens[0..codes-1]. Each length corresponds to the
- symbols 0..codes-1. The Huffman code is generated by first sorting the
- symbols by length from short to long, and retaining the symbol order
- for codes with equal lengths. Then the code starts with all zero bits
- for the first code of the shortest length, and the codes are integer
- increments for the same length, and zeros are appended as the length
- increases. For the deflate format, these bits are stored backwards
- from their more natural integer increment ordering, and so when the
- decoding tables are built in the large loop below, the integer codes
- are incremented backwards.
-
- This routine assumes, but does not check, that all of the entries in
- lens[] are in the range 0..MAXBITS. The caller must assure this.
- 1..MAXBITS is interpreted as that code length. zero means that that
- symbol does not occur in this code.
-
- The codes are sorted by computing a count of codes for each length,
- creating from that a table of starting indices for each length in the
- sorted table, and then entering the symbols in order in the sorted
- table. The sorted table is work[], with that space being provided by
- the caller.
-
- The length counts are used for other purposes as well, i.e. finding
- the minimum and maximum length codes, determining if there are any
- codes at all, checking for a valid set of lengths, and looking ahead
- at length counts to determine sub-table sizes when building the
- decoding tables.
- */
-
- /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
- for (len = 0; len <= MAXBITS; len++)
- count[len] = 0;
- for (sym = 0; sym < codes; sym++)
- count[lens[sym]]++;
-
- /* bound code lengths, force root to be within code lengths */
- root = *bits;
- for (max = MAXBITS; max >= 1; max--)
- if (count[max] != 0) break;
- if (root > max) root = max;
- if (max == 0) return -1; /* no codes! */
- for (min = 1; min <= MAXBITS; min++)
- if (count[min] != 0) break;
- if (root < min) root = min;
-
- /* check for an over-subscribed or incomplete set of lengths */
- left = 1;
- for (len = 1; len <= MAXBITS; len++) {
- left <<= 1;
- left -= count[len];
- if (left < 0) return -1; /* over-subscribed */
- }
- if (left > 0 && (type == CODES || max != 1))
- return -1; /* incomplete set */
-
- /* generate offsets into symbol table for each length for sorting */
- offs[1] = 0;
- for (len = 1; len < MAXBITS; len++)
- offs[len + 1] = offs[len] + count[len];
-
- /* sort symbols by length, by symbol order within each length */
- for (sym = 0; sym < codes; sym++)
- if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym;
-
- /*
- Create and fill in decoding tables. In this loop, the table being
- filled is at next and has curr index bits. The code being used is huff
- with length len. That code is converted to an index by dropping drop
- bits off of the bottom. For codes where len is less than drop + curr,
- those top drop + curr - len bits are incremented through all values to
- fill the table with replicated entries.
-
- root is the number of index bits for the root table. When len exceeds
- root, sub-tables are created pointed to by the root entry with an index
- of the low root bits of huff. This is saved in low to check for when a
- new sub-table should be started. drop is zero when the root table is
- being filled, and drop is root when sub-tables are being filled.
-
- When a new sub-table is needed, it is necessary to look ahead in the
- code lengths to determine what size sub-table is needed. The length
- counts are used for this, and so count[] is decremented as codes are
- entered in the tables.
-
- used keeps track of how many table entries have been allocated from the
- provided *table space. It is checked for LENS and DIST tables against
- the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in
- the initial root table size constants. See the comments in inftree9.h
- for more information.
-
- sym increments through all symbols, and the loop terminates when
- all codes of length max, i.e. all codes, have been processed. This
- routine permits incomplete codes, so another loop after this one fills
- in the rest of the decoding tables with invalid code markers.
- */
-
- /* set up for code type */
- switch (type) {
- case CODES:
- base = extra = work; /* dummy value--not used */
- end = 19;
- break;
- case LENS:
- base = lbase;
- base -= 257;
- extra = lext;
- extra -= 257;
- end = 256;
- break;
- default: /* DISTS */
- base = dbase;
- extra = dext;
- end = -1;
- }
-
- /* initialize state for loop */
- huff = 0; /* starting code */
- sym = 0; /* starting code symbol */
- len = min; /* starting code length */
- next = *table; /* current table to fill in */
- curr = root; /* current table index bits */
- drop = 0; /* current bits to drop from code for index */
- low = (unsigned)(-1); /* trigger new sub-table when len > root */
- used = 1U << root; /* use root table entries */
- mask = used - 1; /* mask for comparing low */
-
- /* check available table space */
- if ((type == LENS && used >= ENOUGH_LENS) ||
- (type == DISTS && used >= ENOUGH_DISTS))
- return 1;
-
- /* process all codes and make table entries */
- for (;;) {
- /* create table entry */
- this.bits = (unsigned char)(len - drop);
- if ((int)(work[sym]) < end) {
- this.op = (unsigned char)0;
- this.val = work[sym];
- }
- else if ((int)(work[sym]) > end) {
- this.op = (unsigned char)(extra[work[sym]]);
- this.val = base[work[sym]];
- }
- else {
- this.op = (unsigned char)(32 + 64); /* end of block */
- this.val = 0;
- }
-
- /* replicate for those indices with low len bits equal to huff */
- incr = 1U << (len - drop);
- fill = 1U << curr;
- do {
- fill -= incr;
- next[(huff >> drop) + fill] = this;
- } while (fill != 0);
-
- /* backwards increment the len-bit code huff */
- incr = 1U << (len - 1);
- while (huff & incr)
- incr >>= 1;
- if (incr != 0) {
- huff &= incr - 1;
- huff += incr;
- }
- else
- huff = 0;
-
- /* go to next symbol, update count, len */
- sym++;
- if (--(count[len]) == 0) {
- if (len == max) break;
- len = lens[work[sym]];
- }
-
- /* create new sub-table if needed */
- if (len > root && (huff & mask) != low) {
- /* if first time, transition to sub-tables */
- if (drop == 0)
- drop = root;
-
- /* increment past last table */
- next += 1U << curr;
-
- /* determine length of next table */
- curr = len - drop;
- left = (int)(1 << curr);
- while (curr + drop < max) {
- left -= count[curr + drop];
- if (left <= 0) break;
- curr++;
- left <<= 1;
- }
-
- /* check for enough space */
- used += 1U << curr;
- if ((type == LENS && used >= ENOUGH_LENS) ||
- (type == DISTS && used >= ENOUGH_DISTS))
- return 1;
-
- /* point entry in root table to sub-table */
- low = huff & mask;
- (*table)[low].op = (unsigned char)curr;
- (*table)[low].bits = (unsigned char)root;
- (*table)[low].val = (unsigned short)(next - *table);
- }
- }
-
- /*
- Fill in rest of table for incomplete codes. This loop is similar to the
- loop above in incrementing huff for table indices. It is assumed that
- len is equal to curr + drop, so there is no loop needed to increment
- through high index bits. When the current sub-table is filled, the loop
- drops back to the root table to fill in any remaining entries there.
- */
- this.op = (unsigned char)64; /* invalid code marker */
- this.bits = (unsigned char)(len - drop);
- this.val = (unsigned short)0;
- while (huff != 0) {
- /* when done with sub-table, drop back to root table */
- if (drop != 0 && (huff & mask) != low) {
- drop = 0;
- len = root;
- next = *table;
- curr = root;
- this.bits = (unsigned char)len;
- }
-
- /* put invalid code marker in table */
- next[huff >> drop] = this;
-
- /* backwards increment the len-bit code huff */
- incr = 1U << (len - 1);
- while (huff & incr)
- incr >>= 1;
- if (incr != 0) {
- huff &= incr - 1;
- huff += incr;
- }
- else
- huff = 0;
- }
-
- /* set return parameters */
- *table += used;
- *bits = root;
- return 0;
-}
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/infback9/inftree9.h
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/infback9/inftree9.h b/c++/libs/zlib-1.2.8/contrib/infback9/inftree9.h
deleted file mode 100644
index 5ab21f0..0000000
--- a/c++/libs/zlib-1.2.8/contrib/infback9/inftree9.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* inftree9.h -- header to use inftree9.c
- * Copyright (C) 1995-2008 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
- part of the implementation of the compression library and is
- subject to change. Applications should only use zlib.h.
- */
-
-/* Structure for decoding tables. Each entry provides either the
- information needed to do the operation requested by the code that
- indexed that table entry, or it provides a pointer to another
- table that indexes more bits of the code. op indicates whether
- the entry is a pointer to another table, a literal, a length or
- distance, an end-of-block, or an invalid code. For a table
- pointer, the low four bits of op is the number of index bits of
- that table. For a length or distance, the low four bits of op
- is the number of extra bits to get after the code. bits is
- the number of bits in this code or part of the code to drop off
- of the bit buffer. val is the actual byte to output in the case
- of a literal, the base length or distance, or the offset from
- the current table to the next table. Each entry is four bytes. */
-typedef struct {
- unsigned char op; /* operation, extra bits, table bits */
- unsigned char bits; /* bits in this part of the code */
- unsigned short val; /* offset in table or code value */
-} code;
-
-/* op values as set by inflate_table():
- 00000000 - literal
- 0000tttt - table link, tttt != 0 is the number of table index bits
- 100eeeee - length or distance, eeee is the number of extra bits
- 01100000 - end of block
- 01000000 - invalid code
- */
-
-/* Maximum size of the dynamic table. The maximum number of code structures is
- 1446, which is the sum of 852 for literal/length codes and 594 for distance
- codes. These values were found by exhaustive searches using the program
- examples/enough.c found in the zlib distribtution. The arguments to that
- program are the number of symbols, the initial root table size, and the
- maximum bit length of a code. "enough 286 9 15" for literal/length codes
- returns returns 852, and "enough 32 6 15" for distance codes returns 594.
- The initial root table size (9 or 6) is found in the fifth argument of the
- inflate_table() calls in infback9.c. If the root table size is changed,
- then these maximum sizes would be need to be recalculated and updated. */
-#define ENOUGH_LENS 852
-#define ENOUGH_DISTS 594
-#define ENOUGH (ENOUGH_LENS+ENOUGH_DISTS)
-
-/* Type of code to build for inflate_table9() */
-typedef enum {
- CODES,
- LENS,
- DISTS
-} codetype;
-
-extern int inflate_table9 OF((codetype type, unsigned short FAR *lens,
- unsigned codes, code FAR * FAR *table,
- unsigned FAR *bits, unsigned short FAR *work));
[29/51] [partial] orc git commit: ORC-204 Update and use CMake
External Project to build C++ compression libraries.
Posted by om...@apache.org.
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/snappy-1.1.2/testdata/plrabn12.txt
----------------------------------------------------------------------
diff --git a/c++/libs/snappy-1.1.2/testdata/plrabn12.txt b/c++/libs/snappy-1.1.2/testdata/plrabn12.txt
deleted file mode 100644
index 34088b8..0000000
--- a/c++/libs/snappy-1.1.2/testdata/plrabn12.txt
+++ /dev/null
@@ -1,10699 +0,0 @@
-
-This is the February 1992 Project Gutenberg release of:
-
-Paradise Lost by John Milton
-
-The oldest etext known to Project Gutenberg (ca. 1964-1965)
-(If you know of any older ones, please let us know.)
-
-
-Introduction (one page)
-
-This etext was originally created in 1964-1965 according to Dr.
-Joseph Raben of Queens College, NY, to whom it is attributed by
-Project Gutenberg. We had heard of this etext for years but it
-was not until 1991 that we actually managed to track it down to
-a specific location, and then it took months to convince people
-to let us have a copy, then more months for them actually to do
-the copying and get it to us. Then another month to convert to
-something we could massage with our favorite 486 in DOS. After
-that is was only a matter of days to get it into this shape you
-will see below. The original was, of course, in CAPS only, and
-so were all the other etexts of the 60's and early 70's. Don't
-let anyone fool you into thinking any etext with both upper and
-lower case is an original; all those original Project Gutenberg
-etexts were also in upper case and were translated or rewritten
-many times to get them into their current condition. They have
-been worked on by many people throughout the world.
-
-In the course of our searches for Professor Raben and his etext
-we were never able to determine where copies were or which of a
-variety of editions he may have used as a source. We did get a
-little information here and there, but even after we received a
-copy of the etext we were unwilling to release it without first
-determining that it was in fact Public Domain and finding Raben
-to verify this and get his permission. Interested enough, in a
-totally unrelated action to our searches for him, the professor
-subscribed to the Project Gutenberg listserver and we happened,
-by accident, to notice his name. (We don't really look at every
-subscription request as the computers usually handle them.) The
-etext was then properly identified, copyright analyzed, and the
-current edition prepared.
-
-To give you an estimation of the difference in the original and
-what we have today: the original was probably entered on cards
-commonly known at the time as "IBM cards" (Do Not Fold, Spindle
-or Mutilate) and probably took in excess of 100,000 of them. A
-single card could hold 80 characters (hence 80 characters is an
-accepted standard for so many computer margins), and the entire
-original edition we received in all caps was over 800,000 chars
-in length, including line enumeration, symbols for caps and the
-punctuation marks, etc., since they were not available keyboard
-characters at the time (probably the keyboards operated at baud
-rates of around 113, meaning the typists had to type slowly for
-the keyboard to keep up).
-
-This is the second version of Paradise Lost released by Project
-Gutenberg. The first was released as our October, 1991 etext.
-
-
-
-
-
-Paradise Lost
-
-
-
-
-Book I
-
-
-Of Man's first disobedience, and the fruit
-Of that forbidden tree whose mortal taste
-Brought death into the World, and all our woe,
-With loss of Eden, till one greater Man
-Restore us, and regain the blissful seat,
-Sing, Heavenly Muse, that, on the secret top
-Of Oreb, or of Sinai, didst inspire
-That shepherd who first taught the chosen seed
-In the beginning how the heavens and earth
-Rose out of Chaos: or, if Sion hill
-Delight thee more, and Siloa's brook that flowed
-Fast by the oracle of God, I thence
-Invoke thy aid to my adventurous song,
-That with no middle flight intends to soar
-Above th' Aonian mount, while it pursues
-Things unattempted yet in prose or rhyme.
-And chiefly thou, O Spirit, that dost prefer
-Before all temples th' upright heart and pure,
-Instruct me, for thou know'st; thou from the first
-Wast present, and, with mighty wings outspread,
-Dove-like sat'st brooding on the vast Abyss,
-And mad'st it pregnant: what in me is dark
-Illumine, what is low raise and support;
-That, to the height of this great argument,
-I may assert Eternal Providence,
-And justify the ways of God to men.
- Say first--for Heaven hides nothing from thy view,
-Nor the deep tract of Hell--say first what cause
-Moved our grand parents, in that happy state,
-Favoured of Heaven so highly, to fall off
-From their Creator, and transgress his will
-For one restraint, lords of the World besides.
-Who first seduced them to that foul revolt?
- Th' infernal Serpent; he it was whose guile,
-Stirred up with envy and revenge, deceived
-The mother of mankind, what time his pride
-Had cast him out from Heaven, with all his host
-Of rebel Angels, by whose aid, aspiring
-To set himself in glory above his peers,
-He trusted to have equalled the Most High,
-If he opposed, and with ambitious aim
-Against the throne and monarchy of God,
-Raised impious war in Heaven and battle proud,
-With vain attempt. Him the Almighty Power
-Hurled headlong flaming from th' ethereal sky,
-With hideous ruin and combustion, down
-To bottomless perdition, there to dwell
-In adamantine chains and penal fire,
-Who durst defy th' Omnipotent to arms.
- Nine times the space that measures day and night
-To mortal men, he, with his horrid crew,
-Lay vanquished, rolling in the fiery gulf,
-Confounded, though immortal. But his doom
-Reserved him to more wrath; for now the thought
-Both of lost happiness and lasting pain
-Torments him: round he throws his baleful eyes,
-That witnessed huge affliction and dismay,
-Mixed with obdurate pride and steadfast hate.
-At once, as far as Angels ken, he views
-The dismal situation waste and wild.
-A dungeon horrible, on all sides round,
-As one great furnace flamed; yet from those flames
-No light; but rather darkness visible
-Served only to discover sights of woe,
-Regions of sorrow, doleful shades, where peace
-And rest can never dwell, hope never comes
-That comes to all, but torture without end
-Still urges, and a fiery deluge, fed
-With ever-burning sulphur unconsumed.
-Such place Eternal Justice has prepared
-For those rebellious; here their prison ordained
-In utter darkness, and their portion set,
-As far removed from God and light of Heaven
-As from the centre thrice to th' utmost pole.
-Oh how unlike the place from whence they fell!
-There the companions of his fall, o'erwhelmed
-With floods and whirlwinds of tempestuous fire,
-He soon discerns; and, weltering by his side,
-One next himself in power, and next in crime,
-Long after known in Palestine, and named
-Beelzebub. To whom th' Arch-Enemy,
-And thence in Heaven called Satan, with bold words
-Breaking the horrid silence, thus began:--
- "If thou beest he--but O how fallen! how changed
-From him who, in the happy realms of light
-Clothed with transcendent brightness, didst outshine
-Myriads, though bright!--if he whom mutual league,
-United thoughts and counsels, equal hope
-And hazard in the glorious enterprise
-Joined with me once, now misery hath joined
-In equal ruin; into what pit thou seest
-From what height fallen: so much the stronger proved
-He with his thunder; and till then who knew
-The force of those dire arms? Yet not for those,
-Nor what the potent Victor in his rage
-Can else inflict, do I repent, or change,
-Though changed in outward lustre, that fixed mind,
-And high disdain from sense of injured merit,
-That with the Mightiest raised me to contend,
-And to the fierce contentions brought along
-Innumerable force of Spirits armed,
-That durst dislike his reign, and, me preferring,
-His utmost power with adverse power opposed
-In dubious battle on the plains of Heaven,
-And shook his throne. What though the field be lost?
-All is not lost--the unconquerable will,
-And study of revenge, immortal hate,
-And courage never to submit or yield:
-And what is else not to be overcome?
-That glory never shall his wrath or might
-Extort from me. To bow and sue for grace
-With suppliant knee, and deify his power
-Who, from the terror of this arm, so late
-Doubted his empire--that were low indeed;
-That were an ignominy and shame beneath
-This downfall; since, by fate, the strength of Gods,
-And this empyreal sybstance, cannot fail;
-Since, through experience of this great event,
-In arms not worse, in foresight much advanced,
-We may with more successful hope resolve
-To wage by force or guile eternal war,
-Irreconcilable to our grand Foe,
-Who now triumphs, and in th' excess of joy
-Sole reigning holds the tyranny of Heaven."
- So spake th' apostate Angel, though in pain,
-Vaunting aloud, but racked with deep despair;
-And him thus answered soon his bold compeer:--
- "O Prince, O Chief of many throned Powers
-That led th' embattled Seraphim to war
-Under thy conduct, and, in dreadful deeds
-Fearless, endangered Heaven's perpetual King,
-And put to proof his high supremacy,
-Whether upheld by strength, or chance, or fate,
-Too well I see and rue the dire event
-That, with sad overthrow and foul defeat,
-Hath lost us Heaven, and all this mighty host
-In horrible destruction laid thus low,
-As far as Gods and heavenly Essences
-Can perish: for the mind and spirit remains
-Invincible, and vigour soon returns,
-Though all our glory extinct, and happy state
-Here swallowed up in endless misery.
-But what if he our Conqueror (whom I now
-Of force believe almighty, since no less
-Than such could have o'erpowered such force as ours)
-Have left us this our spirit and strength entire,
-Strongly to suffer and support our pains,
-That we may so suffice his vengeful ire,
-Or do him mightier service as his thralls
-By right of war, whate'er his business be,
-Here in the heart of Hell to work in fire,
-Or do his errands in the gloomy Deep?
-What can it the avail though yet we feel
-Strength undiminished, or eternal being
-To undergo eternal punishment?"
- Whereto with speedy words th' Arch-Fiend replied:--
-"Fallen Cherub, to be weak is miserable,
-Doing or suffering: but of this be sure--
-To do aught good never will be our task,
-But ever to do ill our sole delight,
-As being the contrary to his high will
-Whom we resist. If then his providence
-Out of our evil seek to bring forth good,
-Our labour must be to pervert that end,
-And out of good still to find means of evil;
-Which ofttimes may succeed so as perhaps
-Shall grieve him, if I fail not, and disturb
-His inmost counsels from their destined aim.
-But see! the angry Victor hath recalled
-His ministers of vengeance and pursuit
-Back to the gates of Heaven: the sulphurous hail,
-Shot after us in storm, o'erblown hath laid
-The fiery surge that from the precipice
-Of Heaven received us falling; and the thunder,
-Winged with red lightning and impetuous rage,
-Perhaps hath spent his shafts, and ceases now
-To bellow through the vast and boundless Deep.
-Let us not slip th' occasion, whether scorn
-Or satiate fury yield it from our Foe.
-Seest thou yon dreary plain, forlorn and wild,
-The seat of desolation, void of light,
-Save what the glimmering of these livid flames
-Casts pale and dreadful? Thither let us tend
-From off the tossing of these fiery waves;
-There rest, if any rest can harbour there;
-And, re-assembling our afflicted powers,
-Consult how we may henceforth most offend
-Our enemy, our own loss how repair,
-How overcome this dire calamity,
-What reinforcement we may gain from hope,
-If not, what resolution from despair."
- Thus Satan, talking to his nearest mate,
-With head uplift above the wave, and eyes
-That sparkling blazed; his other parts besides
-Prone on the flood, extended long and large,
-Lay floating many a rood, in bulk as huge
-As whom the fables name of monstrous size,
-Titanian or Earth-born, that warred on Jove,
-Briareos or Typhon, whom the den
-By ancient Tarsus held, or that sea-beast
-Leviathan, which God of all his works
-Created hugest that swim th' ocean-stream.
-Him, haply slumbering on the Norway foam,
-The pilot of some small night-foundered skiff,
-Deeming some island, oft, as seamen tell,
-With fixed anchor in his scaly rind,
-Moors by his side under the lee, while night
-Invests the sea, and wished morn delays.
-So stretched out huge in length the Arch-fiend lay,
-Chained on the burning lake; nor ever thence
-Had risen, or heaved his head, but that the will
-And high permission of all-ruling Heaven
-Left him at large to his own dark designs,
-That with reiterated crimes he might
-Heap on himself damnation, while he sought
-Evil to others, and enraged might see
-How all his malice served but to bring forth
-Infinite goodness, grace, and mercy, shewn
-On Man by him seduced, but on himself
-Treble confusion, wrath, and vengeance poured.
- Forthwith upright he rears from off the pool
-His mighty stature; on each hand the flames
-Driven backward slope their pointing spires, and,rolled
-In billows, leave i' th' midst a horrid vale.
-Then with expanded wings he steers his flight
-Aloft, incumbent on the dusky air,
-That felt unusual weight; till on dry land
-He lights--if it were land that ever burned
-With solid, as the lake with liquid fire,
-And such appeared in hue as when the force
-Of subterranean wind transprots a hill
-Torn from Pelorus, or the shattered side
-Of thundering Etna, whose combustible
-And fuelled entrails, thence conceiving fire,
-Sublimed with mineral fury, aid the winds,
-And leave a singed bottom all involved
-With stench and smoke. Such resting found the sole
-Of unblest feet. Him followed his next mate;
-Both glorying to have scaped the Stygian flood
-As gods, and by their own recovered strength,
-Not by the sufferance of supernal Power.
- "Is this the region, this the soil, the clime,"
-Said then the lost Archangel, "this the seat
-That we must change for Heaven?--this mournful gloom
-For that celestial light? Be it so, since he
-Who now is sovereign can dispose and bid
-What shall be right: farthest from him is best
-Whom reason hath equalled, force hath made supreme
-Above his equals. Farewell, happy fields,
-Where joy for ever dwells! Hail, horrors! hail,
-Infernal world! and thou, profoundest Hell,
-Receive thy new possessor--one who brings
-A mind not to be changed by place or time.
-The mind is its own place, and in itself
-Can make a Heaven of Hell, a Hell of Heaven.
-What matter where, if I be still the same,
-And what I should be, all but less than he
-Whom thunder hath made greater? Here at least
-We shall be free; th' Almighty hath not built
-Here for his envy, will not drive us hence:
-Here we may reigh secure; and, in my choice,
-To reign is worth ambition, though in Hell:
-Better to reign in Hell than serve in Heaven.
-But wherefore let we then our faithful friends,
-Th' associates and co-partners of our loss,
-Lie thus astonished on th' oblivious pool,
-And call them not to share with us their part
-In this unhappy mansion, or once more
-With rallied arms to try what may be yet
-Regained in Heaven, or what more lost in Hell?"
- So Satan spake; and him Beelzebub
-Thus answered:--"Leader of those armies bright
-Which, but th' Omnipotent, none could have foiled!
-If once they hear that voice, their liveliest pledge
-Of hope in fears and dangers--heard so oft
-In worst extremes, and on the perilous edge
-Of battle, when it raged, in all assaults
-Their surest signal--they will soon resume
-New courage and revive, though now they lie
-Grovelling and prostrate on yon lake of fire,
-As we erewhile, astounded and amazed;
-No wonder, fallen such a pernicious height!"
- He scare had ceased when the superior Fiend
-Was moving toward the shore; his ponderous shield,
-Ethereal temper, massy, large, and round,
-Behind him cast. The broad circumference
-Hung on his shoulders like the moon, whose orb
-Through optic glass the Tuscan artist views
-At evening, from the top of Fesole,
-Or in Valdarno, to descry new lands,
-Rivers, or mountains, in her spotty globe.
-His spear--to equal which the tallest pine
-Hewn on Norwegian hills, to be the mast
-Of some great ammiral, were but a wand--
-He walked with, to support uneasy steps
-Over the burning marl, not like those steps
-On Heaven's azure; and the torrid clime
-Smote on him sore besides, vaulted with fire.
-Nathless he so endured, till on the beach
-Of that inflamed sea he stood, and called
-His legions--Angel Forms, who lay entranced
-Thick as autumnal leaves that strow the brooks
-In Vallombrosa, where th' Etrurian shades
-High over-arched embower; or scattered sedge
-Afloat, when with fierce winds Orion armed
-Hath vexed the Red-Sea coast, whose waves o'erthrew
-Busiris and his Memphian chivalry,
-While with perfidious hatred they pursued
-The sojourners of Goshen, who beheld
-From the safe shore their floating carcases
-And broken chariot-wheels. So thick bestrown,
-Abject and lost, lay these, covering the flood,
-Under amazement of their hideous change.
-He called so loud that all the hollow deep
-Of Hell resounded:--"Princes, Potentates,
-Warriors, the Flower of Heaven--once yours; now lost,
-If such astonishment as this can seize
-Eternal Spirits! Or have ye chosen this place
-After the toil of battle to repose
-Your wearied virtue, for the ease you find
-To slumber here, as in the vales of Heaven?
-Or in this abject posture have ye sworn
-To adore the Conqueror, who now beholds
-Cherub and Seraph rolling in the flood
-With scattered arms and ensigns, till anon
-His swift pursuers from Heaven-gates discern
-Th' advantage, and, descending, tread us down
-Thus drooping, or with linked thunderbolts
-Transfix us to the bottom of this gulf?
-Awake, arise, or be for ever fallen!"
- They heard, and were abashed, and up they sprung
-Upon the wing, as when men wont to watch
-On duty, sleeping found by whom they dread,
-Rouse and bestir themselves ere well awake.
-Nor did they not perceive the evil plight
-In which they were, or the fierce pains not feel;
-Yet to their General's voice they soon obeyed
-Innumerable. As when the potent rod
-Of Amram's son, in Egypt's evil day,
-Waved round the coast, up-called a pitchy cloud
-Of locusts, warping on the eastern wind,
-That o'er the realm of impious Pharaoh hung
-Like Night, and darkened all the land of Nile;
-So numberless were those bad Angels seen
-Hovering on wing under the cope of Hell,
-'Twixt upper, nether, and surrounding fires;
-Till, as a signal given, th' uplifted spear
-Of their great Sultan waving to direct
-Their course, in even balance down they light
-On the firm brimstone, and fill all the plain:
-A multitude like which the populous North
-Poured never from her frozen loins to pass
-Rhene or the Danaw, when her barbarous sons
-Came like a deluge on the South, and spread
-Beneath Gibraltar to the Libyan sands.
-Forthwith, form every squadron and each band,
-The heads and leaders thither haste where stood
-Their great Commander--godlike Shapes, and Forms
-Excelling human; princely Dignities;
-And Powers that erst in Heaven sat on thrones,
-Though on their names in Heavenly records now
-Be no memorial, blotted out and rased
-By their rebellion from the Books of Life.
-Nor had they yet among the sons of Eve
-Got them new names, till, wandering o'er the earth,
-Through God's high sufferance for the trial of man,
-By falsities and lies the greatest part
-Of mankind they corrupted to forsake
-God their Creator, and th' invisible
-Glory of him that made them to transform
-Oft to the image of a brute, adorned
-With gay religions full of pomp and gold,
-And devils to adore for deities:
-Then were they known to men by various names,
-And various idols through the heathen world.
- Say, Muse, their names then known, who first, who last,
-Roused from the slumber on that fiery couch,
-At their great Emperor's call, as next in worth
-Came singly where he stood on the bare strand,
-While the promiscuous crowd stood yet aloof?
- The chief were those who, from the pit of Hell
-Roaming to seek their prey on Earth, durst fix
-Their seats, long after, next the seat of God,
-Their altars by his altar, gods adored
-Among the nations round, and durst abide
-Jehovah thundering out of Sion, throned
-Between the Cherubim; yea, often placed
-Within his sanctuary itself their shrines,
-Abominations; and with cursed things
-His holy rites and solemn feasts profaned,
-And with their darkness durst affront his light.
-First, Moloch, horrid king, besmeared with blood
-Of human sacrifice, and parents' tears;
-Though, for the noise of drums and timbrels loud,
-Their children's cries unheard that passed through fire
-To his grim idol. Him the Ammonite
-Worshiped in Rabba and her watery plain,
-In Argob and in Basan, to the stream
-Of utmost Arnon. Nor content with such
-Audacious neighbourhood, the wisest heart
-Of Solomon he led by fraoud to build
-His temple right against the temple of God
-On that opprobrious hill, and made his grove
-The pleasant valley of Hinnom, Tophet thence
-And black Gehenna called, the type of Hell.
-Next Chemos, th' obscene dread of Moab's sons,
-From Aroar to Nebo and the wild
-Of southmost Abarim; in Hesebon
-And Horonaim, Seon's real, beyond
-The flowery dale of Sibma clad with vines,
-And Eleale to th' Asphaltic Pool:
-Peor his other name, when he enticed
-Israel in Sittim, on their march from Nile,
-To do him wanton rites, which cost them woe.
-Yet thence his lustful orgies he enlarged
-Even to that hill of scandal, by the grove
-Of Moloch homicide, lust hard by hate,
-Till good Josiah drove them thence to Hell.
-With these came they who, from the bordering flood
-Of old Euphrates to the brook that parts
-Egypt from Syrian ground, had general names
-Of Baalim and Ashtaroth--those male,
-These feminine. For Spirits, when they please,
-Can either sex assume, or both; so soft
-And uncompounded is their essence pure,
-Not tried or manacled with joint or limb,
-Nor founded on the brittle strength of bones,
-Like cumbrous flesh; but, in what shape they choose,
-Dilated or condensed, bright or obscure,
-Can execute their airy purposes,
-And works of love or enmity fulfil.
-For those the race of Israel oft forsook
-Their Living Strength, and unfrequented left
-His righteous altar, bowing lowly down
-To bestial gods; for which their heads as low
-Bowed down in battle, sunk before the spear
-Of despicable foes. With these in troop
-Came Astoreth, whom the Phoenicians called
-Astarte, queen of heaven, with crescent horns;
-To whose bright image nigntly by the moon
-Sidonian virgins paid their vows and songs;
-In Sion also not unsung, where stood
-Her temple on th' offensive mountain, built
-By that uxorious king whose heart, though large,
-Beguiled by fair idolatresses, fell
-To idols foul. Thammuz came next behind,
-Whose annual wound in Lebanon allured
-The Syrian damsels to lament his fate
-In amorous ditties all a summer's day,
-While smooth Adonis from his native rock
-Ran purple to the sea, supposed with blood
-Of Thammuz yearly wounded: the love-tale
-Infected Sion's daughters with like heat,
-Whose wanton passions in the sacred proch
-Ezekiel saw, when, by the vision led,
-His eye surveyed the dark idolatries
-Of alienated Judah. Next came one
-Who mourned in earnest, when the captive ark
-Maimed his brute image, head and hands lopt off,
-In his own temple, on the grunsel-edge,
-Where he fell flat and shamed his worshippers:
-Dagon his name, sea-monster,upward man
-And downward fish; yet had his temple high
-Reared in Azotus, dreaded through the coast
-Of Palestine, in Gath and Ascalon,
-And Accaron and Gaza's frontier bounds.
-Him followed Rimmon, whose delightful seat
-Was fair Damascus, on the fertile banks
-Of Abbana and Pharphar, lucid streams.
-He also against the house of God was bold:
-A leper once he lost, and gained a king--
-Ahaz, his sottish conqueror, whom he drew
-God's altar to disparage and displace
-For one of Syrian mode, whereon to burn
-His odious offerings, and adore the gods
-Whom he had vanquished. After these appeared
-A crew who, under names of old renown--
-Osiris, Isis, Orus, and their train--
-With monstrous shapes and sorceries abused
-Fanatic Egypt and her priests to seek
-Their wandering gods disguised in brutish forms
-Rather than human. Nor did Israel scape
-Th' infection, when their borrowed gold composed
-The calf in Oreb; and the rebel king
-Doubled that sin in Bethel and in Dan,
-Likening his Maker to the grazed ox--
-Jehovah, who, in one night, when he passed
-From Egypt marching, equalled with one stroke
-Both her first-born and all her bleating gods.
-Belial came last; than whom a Spirit more lewd
-Fell not from Heaven, or more gross to love
-Vice for itself. To him no temple stood
-Or altar smoked; yet who more oft than he
-In temples and at altars, when the priest
-Turns atheist, as did Eli's sons, who filled
-With lust and violence the house of God?
-In courts and palaces he also reigns,
-And in luxurious cities, where the noise
-Of riot ascends above their loftiest towers,
-And injury and outrage; and, when night
-Darkens the streets, then wander forth the sons
-Of Belial, flown with insolence and wine.
-Witness the streets of Sodom, and that night
-In Gibeah, when the hospitable door
-Exposed a matron, to avoid worse rape.
- These were the prime in order and in might:
-The rest were long to tell; though far renowned
-Th' Ionian gods--of Javan's issue held
-Gods, yet confessed later than Heaven and Earth,
-Their boasted parents;--Titan, Heaven's first-born,
-With his enormous brood, and birthright seized
-By younger Saturn: he from mightier Jove,
-His own and Rhea's son, like measure found;
-So Jove usurping reigned. These, first in Crete
-And Ida known, thence on the snowy top
-Of cold Olympus ruled the middle air,
-Their highest heaven; or on the Delphian cliff,
-Or in Dodona, and through all the bounds
-Of Doric land; or who with Saturn old
-Fled over Adria to th' Hesperian fields,
-And o'er the Celtic roamed the utmost Isles.
- All these and more came flocking; but with looks
-Downcast and damp; yet such wherein appeared
-Obscure some glimpse of joy to have found their Chief
-Not in despair, to have found themselves not lost
-In loss itself; which on his countenance cast
-Like doubtful hue. But he, his wonted pride
-Soon recollecting, with high words, that bore
-Semblance of worth, not substance, gently raised
-Their fainting courage, and dispelled their fears.
-Then straight commands that, at the warlike sound
-Of trumpets loud and clarions, be upreared
-His mighty standard. That proud honour claimed
-Azazel as his right, a Cherub tall:
-Who forthwith from the glittering staff unfurled
-Th' imperial ensign; which, full high advanced,
-Shone like a meteor streaming to the wind,
-With gems and golden lustre rich emblazed,
-Seraphic arms and trophies; all the while
-Sonorous metal blowing martial sounds:
-At which the universal host up-sent
-A shout that tore Hell's concave, and beyond
-Frighted the reign of Chaos and old Night.
-All in a moment through the gloom were seen
-Ten thousand banners rise into the air,
-With orient colours waving: with them rose
-A forest huge of spears; and thronging helms
-Appeared, and serried shields in thick array
-Of depth immeasurable. Anon they move
-In perfect phalanx to the Dorian mood
-Of flutes and soft recorders--such as raised
-To height of noblest temper heroes old
-Arming to battle, and instead of rage
-Deliberate valour breathed, firm, and unmoved
-With dread of death to flight or foul retreat;
-Nor wanting power to mitigate and swage
-With solemn touches troubled thoughts, and chase
-Anguish and doubt and fear and sorrow and pain
-From mortal or immortal minds. Thus they,
-Breathing united force with fixed thought,
-Moved on in silence to soft pipes that charmed
-Their painful steps o'er the burnt soil. And now
-Advanced in view they stand--a horrid front
-Of dreadful length and dazzling arms, in guise
-Of warriors old, with ordered spear and shield,
-Awaiting what command their mighty Chief
-Had to impose. He through the armed files
-Darts his experienced eye, and soon traverse
-The whole battalion views--their order due,
-Their visages and stature as of gods;
-Their number last he sums. And now his heart
-Distends with pride, and, hardening in his strength,
-Glories: for never, since created Man,
-Met such embodied force as, named with these,
-Could merit more than that small infantry
-Warred on by cranes--though all the giant brood
-Of Phlegra with th' heroic race were joined
-That fought at Thebes and Ilium, on each side
-Mixed with auxiliar gods; and what resounds
-In fable or romance of Uther's son,
-Begirt with British and Armoric knights;
-And all who since, baptized or infidel,
-Jousted in Aspramont, or Montalban,
-Damasco, or Marocco, or Trebisond,
-Or whom Biserta sent from Afric shore
-When Charlemain with all his peerage fell
-By Fontarabbia. Thus far these beyond
-Compare of mortal prowess, yet observed
-Their dread Commander. He, above the rest
-In shape and gesture proudly eminent,
-Stood like a tower. His form had yet not lost
-All her original brightness, nor appeared
-Less than Archangel ruined, and th' excess
-Of glory obscured: as when the sun new-risen
-Looks through the horizontal misty air
-Shorn of his beams, or, from behind the moon,
-In dim eclipse, disastrous twilight sheds
-On half the nations, and with fear of change
-Perplexes monarchs. Darkened so, yet shone
-Above them all th' Archangel: but his face
-Deep scars of thunder had intrenched, and care
-Sat on his faded cheek, but under brows
-Of dauntless courage, and considerate pride
-Waiting revenge. Cruel his eye, but cast
-Signs of remorse and passion, to behold
-The fellows of his crime, the followers rather
-(Far other once beheld in bliss), condemned
-For ever now to have their lot in pain--
-Millions of Spirits for his fault amerced
-Of Heaven, and from eteranl splendours flung
-For his revolt--yet faithful how they stood,
-Their glory withered; as, when heaven's fire
-Hath scathed the forest oaks or mountain pines,
-With singed top their stately growth, though bare,
-Stands on the blasted heath. He now prepared
-To speak; whereat their doubled ranks they bend
-From wing to wing, and half enclose him round
-With all his peers: attention held them mute.
-Thrice he assayed, and thrice, in spite of scorn,
-Tears, such as Angels weep, burst forth: at last
-Words interwove with sighs found out their way:--
- "O myriads of immortal Spirits! O Powers
-Matchless, but with th' Almighth!--and that strife
-Was not inglorious, though th' event was dire,
-As this place testifies, and this dire change,
-Hateful to utter. But what power of mind,
-Forseeing or presaging, from the depth
-Of knowledge past or present, could have feared
-How such united force of gods, how such
-As stood like these, could ever know repulse?
-For who can yet believe, though after loss,
-That all these puissant legions, whose exile
-Hath emptied Heaven, shall fail to re-ascend,
-Self-raised, and repossess their native seat?
-For me, be witness all the host of Heaven,
-If counsels different, or danger shunned
-By me, have lost our hopes. But he who reigns
-Monarch in Heaven till then as one secure
-Sat on his throne, upheld by old repute,
-Consent or custom, and his regal state
-Put forth at full, but still his strength concealed--
-Which tempted our attempt, and wrought our fall.
-Henceforth his might we know, and know our own,
-So as not either to provoke, or dread
-New war provoked: our better part remains
-To work in close design, by fraud or guile,
-What force effected not; that he no less
-At length from us may find, who overcomes
-By force hath overcome but half his foe.
-Space may produce new Worlds; whereof so rife
-There went a fame in Heaven that he ere long
-Intended to create, and therein plant
-A generation whom his choice regard
-Should favour equal to the Sons of Heaven.
-Thither, if but to pry, shall be perhaps
-Our first eruption--thither, or elsewhere;
-For this infernal pit shall never hold
-Celestial Spirits in bondage, nor th' Abyss
-Long under darkness cover. But these thoughts
-Full counsel must mature. Peace is despaired;
-For who can think submission? War, then, war
-Open or understood, must be resolved."
- He spake; and, to confirm his words, outflew
-Millions of flaming swords, drawn from the thighs
-Of mighty Cherubim; the sudden blaze
-Far round illumined Hell. Highly they raged
-Against the Highest, and fierce with grasped arms
-Clashed on their sounding shields the din of war,
-Hurling defiance toward the vault of Heaven.
- There stood a hill not far, whose grisly top
-Belched fire and rolling smoke; the rest entire
-Shone with a glossy scurf--undoubted sign
-That in his womb was hid metallic ore,
-The work of sulphur. Thither, winged with speed,
-A numerous brigade hastened: as when bands
-Of pioneers, with spade and pickaxe armed,
-Forerun the royal camp, to trench a field,
-Or cast a rampart. Mammon led them on--
-Mammon, the least erected Spirit that fell
-From Heaven; for even in Heaven his looks and thoughts
-Were always downward bent, admiring more
-The riches of heaven's pavement, trodden gold,
-Than aught divine or holy else enjoyed
-In vision beatific. By him first
-Men also, and by his suggestion taught,
-Ransacked the centre, and with impious hands
-Rifled the bowels of their mother Earth
-For treasures better hid. Soon had his crew
-Opened into the hill a spacious wound,
-And digged out ribs of gold. Let none admire
-That riches grow in Hell; that soil may best
-Deserve the precious bane. And here let those
-Who boast in mortal things, and wondering tell
-Of Babel, and the works of Memphian kings,
-Learn how their greatest monuments of fame
-And strength, and art, are easily outdone
-By Spirits reprobate, and in an hour
-What in an age they, with incessant toil
-And hands innumerable, scarce perform.
-Nigh on the plain, in many cells prepared,
-That underneath had veins of liquid fire
-Sluiced from the lake, a second multitude
-With wondrous art founded the massy ore,
-Severing each kind, and scummed the bullion-dross.
-A third as soon had formed within the ground
-A various mould, and from the boiling cells
-By strange conveyance filled each hollow nook;
-As in an organ, from one blast of wind,
-To many a row of pipes the sound-board breathes.
-Anon out of the earth a fabric huge
-Rose like an exhalation, with the sound
-Of dulcet symphonies and voices sweet--
-Built like a temple, where pilasters round
-Were set, and Doric pillars overlaid
-With golden architrave; nor did there want
-Cornice or frieze, with bossy sculptures graven;
-The roof was fretted gold. Not Babylon
-Nor great Alcairo such magnificence
-Equalled in all their glories, to enshrine
-Belus or Serapis their gods, or seat
-Their kings, when Egypt with Assyria strove
-In wealth and luxury. Th' ascending pile
-Stood fixed her stately height, and straight the doors,
-Opening their brazen folds, discover, wide
-Within, her ample spaces o'er the smooth
-And level pavement: from the arched roof,
-Pendent by subtle magic, many a row
-Of starry lamps and blazing cressets, fed
-With naptha and asphaltus, yielded light
-As from a sky. The hasty multitude
-Admiring entered; and the work some praise,
-And some the architect. His hand was known
-In Heaven by many a towered structure high,
-Where sceptred Angels held their residence,
-And sat as Princes, whom the supreme King
-Exalted to such power, and gave to rule,
-Each in his Hierarchy, the Orders bright.
-Nor was his name unheard or unadored
-In ancient Greece; and in Ausonian land
-Men called him Mulciber; and how he fell
-From Heaven they fabled, thrown by angry Jove
-Sheer o'er the crystal battlements: from morn
-To noon he fell, from noon to dewy eve,
-A summer's day, and with the setting sun
-Dropt from the zenith, like a falling star,
-On Lemnos, th' Aegaean isle. Thus they relate,
-Erring; for he with this rebellious rout
-Fell long before; nor aught aviled him now
-To have built in Heaven high towers; nor did he scape
-By all his engines, but was headlong sent,
-With his industrious crew, to build in Hell.
- Meanwhile the winged Heralds, by command
-Of sovereign power, with awful ceremony
-And trumpet's sound, throughout the host proclaim
-A solemn council forthwith to be held
-At Pandemonium, the high capital
-Of Satan and his peers. Their summons called
-From every band and squared regiment
-By place or choice the worthiest: they anon
-With hundreds and with thousands trooping came
-Attended. All access was thronged; the gates
-And porches wide, but chief the spacious hall
-(Though like a covered field, where champions bold
-Wont ride in armed, and at the Soldan's chair
-Defied the best of Paynim chivalry
-To mortal combat, or career with lance),
-Thick swarmed, both on the ground and in the air,
-Brushed with the hiss of rustling wings. As bees
-In spring-time, when the Sun with Taurus rides.
-Pour forth their populous youth about the hive
-In clusters; they among fresh dews and flowers
-Fly to and fro, or on the smoothed plank,
-The suburb of their straw-built citadel,
-New rubbed with balm, expatiate, and confer
-Their state-affairs: so thick the airy crowd
-Swarmed and were straitened; till, the signal given,
-Behold a wonder! They but now who seemed
-In bigness to surpass Earth's giant sons,
-Now less than smallest dwarfs, in narrow room
-Throng numberless--like that pygmean race
-Beyond the Indian mount; or faery elves,
-Whose midnight revels, by a forest-side
-Or fountain, some belated peasant sees,
-Or dreams he sees, while overhead the Moon
-Sits arbitress, and nearer to the Earth
-Wheels her pale course: they, on their mirth and dance
-Intent, with jocund music charm his ear;
-At once with joy and fear his heart rebounds.
-Thus incorporeal Spirits to smallest forms
-Reduced their shapes immense, and were at large,
-Though without number still, amidst the hall
-Of that infernal court. But far within,
-And in their own dimensions like themselves,
-The great Seraphic Lords and Cherubim
-In close recess and secret conclave sat,
-A thousand demi-gods on golden seats,
-Frequent and full. After short silence then,
-And summons read, the great consult began.
-
-
-
-Book II
-
-
-High on a throne of royal state, which far
-Outshone the wealth or Ormus and of Ind,
-Or where the gorgeous East with richest hand
-Showers on her kings barbaric pearl and gold,
-Satan exalted sat, by merit raised
-To that bad eminence; and, from despair
-Thus high uplifted beyond hope, aspires
-Beyond thus high, insatiate to pursue
-Vain war with Heaven; and, by success untaught,
-His proud imaginations thus displayed:--
- "Powers and Dominions, Deities of Heaven!--
-For, since no deep within her gulf can hold
-Immortal vigour, though oppressed and fallen,
-I give not Heaven for lost: from this descent
-Celestial Virtues rising will appear
-More glorious and more dread than from no fall,
-And trust themselves to fear no second fate!--
-Me though just right, and the fixed laws of Heaven,
-Did first create your leader--next, free choice
-With what besides in council or in fight
-Hath been achieved of merit--yet this loss,
-Thus far at least recovered, hath much more
-Established in a safe, unenvied throne,
-Yielded with full consent. The happier state
-In Heaven, which follows dignity, might draw
-Envy from each inferior; but who here
-Will envy whom the highest place exposes
-Foremost to stand against the Thunderer's aim
-Your bulwark, and condemns to greatest share
-Of endless pain? Where there is, then, no good
-For which to strive, no strife can grow up there
-From faction: for none sure will claim in Hell
-Precedence; none whose portion is so small
-Of present pain that with ambitious mind
-Will covet more! With this advantage, then,
-To union, and firm faith, and firm accord,
-More than can be in Heaven, we now return
-To claim our just inheritance of old,
-Surer to prosper than prosperity
-Could have assured us; and by what best way,
-Whether of open war or covert guile,
-We now debate. Who can advise may speak."
- He ceased; and next him Moloch, sceptred king,
-Stood up--the strongest and the fiercest Spirit
-That fought in Heaven, now fiercer by despair.
-His trust was with th' Eternal to be deemed
-Equal in strength, and rather than be less
-Cared not to be at all; with that care lost
-Went all his fear: of God, or Hell, or worse,
-He recked not, and these words thereafter spake:--
- "My sentence is for open war. Of wiles,
-More unexpert, I boast not: them let those
-Contrive who need, or when they need; not now.
-For, while they sit contriving, shall the rest--
-Millions that stand in arms, and longing wait
-The signal to ascend--sit lingering here,
-Heaven's fugitives, and for their dwelling-place
-Accept this dark opprobrious den of shame,
-The prison of his ryranny who reigns
-By our delay? No! let us rather choose,
-Armed with Hell-flames and fury, all at once
-O'er Heaven's high towers to force resistless way,
-Turning our tortures into horrid arms
-Against the Torturer; when, to meet the noise
-Of his almighty engine, he shall hear
-Infernal thunder, and, for lightning, see
-Black fire and horror shot with equal rage
-Among his Angels, and his throne itself
-Mixed with Tartarean sulphur and strange fire,
-His own invented torments. But perhaps
-The way seems difficult, and steep to scale
-With upright wing against a higher foe!
-Let such bethink them, if the sleepy drench
-Of that forgetful lake benumb not still,
-That in our porper motion we ascend
-Up to our native seat; descent and fall
-To us is adverse. Who but felt of late,
-When the fierce foe hung on our broken rear
-Insulting, and pursued us through the Deep,
-With what compulsion and laborious flight
-We sunk thus low? Th' ascent is easy, then;
-Th' event is feared! Should we again provoke
-Our stronger, some worse way his wrath may find
-To our destruction, if there be in Hell
-Fear to be worse destroyed! What can be worse
-Than to dwell here, driven out from bliss, condemned
-In this abhorred deep to utter woe!
-Where pain of unextinguishable fire
-Must exercise us without hope of end
-The vassals of his anger, when the scourge
-Inexorably, and the torturing hour,
-Calls us to penance? More destroyed than thus,
-We should be quite abolished, and expire.
-What fear we then? what doubt we to incense
-His utmost ire? which, to the height enraged,
-Will either quite consume us, and reduce
-To nothing this essential--happier far
-Than miserable to have eternal being!--
-Or, if our substance be indeed divine,
-And cannot cease to be, we are at worst
-On this side nothing; and by proof we feel
-Our power sufficient to disturb his Heaven,
-And with perpetual inroads to alarm,
-Though inaccessible, his fatal throne:
-Which, if not victory, is yet revenge."
- He ended frowning, and his look denounced
-Desperate revenge, and battle dangerous
-To less than gods. On th' other side up rose
-Belial, in act more graceful and humane.
-A fairer person lost not Heaven; he seemed
-For dignity composed, and high exploit.
-But all was false and hollow; though his tongue
-Dropped manna, and could make the worse appear
-The better reason, to perplex and dash
-Maturest counsels: for his thoughts were low--
- To vice industrious, but to nobler deeds
-Timorous and slothful. Yet he pleased the ear,
-And with persuasive accent thus began:--
- "I should be much for open war, O Peers,
-As not behind in hate, if what was urged
-Main reason to persuade immediate war
-Did not dissuade me most, and seem to cast
-Ominous conjecture on the whole success;
-When he who most excels in fact of arms,
-In what he counsels and in what excels
-Mistrustful, grounds his courage on despair
-And utter dissolution, as the scope
-Of all his aim, after some dire revenge.
-First, what revenge? The towers of Heaven are filled
-With armed watch, that render all access
-Impregnable: oft on the bodering Deep
-Encamp their legions, or with obscure wing
-Scout far and wide into the realm of Night,
-Scorning surprise. Or, could we break our way
-By force, and at our heels all Hell should rise
-With blackest insurrection to confound
-Heaven's purest light, yet our great Enemy,
-All incorruptible, would on his throne
-Sit unpolluted, and th' ethereal mould,
-Incapable of stain, would soon expel
-Her mischief, and purge off the baser fire,
-Victorious. Thus repulsed, our final hope
-Is flat despair: we must exasperate
-Th' Almighty Victor to spend all his rage;
-And that must end us; that must be our cure--
-To be no more. Sad cure! for who would lose,
-Though full of pain, this intellectual being,
-Those thoughts that wander through eternity,
-To perish rather, swallowed up and lost
-In the wide womb of uncreated Night,
-Devoid of sense and motion? And who knows,
-Let this be good, whether our angry Foe
-Can give it, or will ever? How he can
-Is doubtful; that he never will is sure.
-Will he, so wise, let loose at once his ire,
-Belike through impotence or unaware,
-To give his enemies their wish, and end
-Them in his anger whom his anger saves
-To punish endless? 'Wherefore cease we, then?'
-Say they who counsel war; 'we are decreed,
-Reserved, and destined to eternal woe;
-Whatever doing, what can we suffer more,
-What can we suffer worse?' Is this, then, worst--
-Thus sitting, thus consulting, thus in arms?
-What when we fled amain, pursued and struck
-With Heaven's afflicting thunder, and besought
-The Deep to shelter us? This Hell then seemed
-A refuge from those wounds. Or when we lay
-Chained on the burning lake? That sure was worse.
-What if the breath that kindled those grim fires,
-Awaked, should blow them into sevenfold rage,
-And plunge us in the flames; or from above
-Should intermitted vengeance arm again
-His red right hand to plague us? What if all
-Her stores were opened, and this firmament
-Of Hell should spout her cataracts of fire,
-Impendent horrors, threatening hideous fall
-One day upon our heads; while we perhaps,
-Designing or exhorting glorious war,
-Caught in a fiery tempest, shall be hurled,
-Each on his rock transfixed, the sport and prey
-Or racking whirlwinds, or for ever sunk
-Under yon boiling ocean, wrapt in chains,
-There to converse with everlasting groans,
-Unrespited, unpitied, unreprieved,
-Ages of hopeless end? This would be worse.
-War, therefore, open or concealed, alike
-My voice dissuades; for what can force or guile
-With him, or who deceive his mind, whose eye
-Views all things at one view? He from Heaven's height
-All these our motions vain sees and derides,
-Not more almighty to resist our might
-Than wise to frustrate all our plots and wiles.
-Shall we, then, live thus vile--the race of Heaven
-Thus trampled, thus expelled, to suffer here
-Chains and these torments? Better these than worse,
-By my advice; since fate inevitable
-Subdues us, and omnipotent decree,
-The Victor's will. To suffer, as to do,
-Our strength is equal; nor the law unjust
-That so ordains. This was at first resolved,
-If we were wise, against so great a foe
-Contending, and so doubtful what might fall.
-I laugh when those who at the spear are bold
-And venturous, if that fail them, shrink, and fear
-What yet they know must follow--to endure
-Exile, or igominy, or bonds, or pain,
-The sentence of their Conqueror. This is now
-Our doom; which if we can sustain and bear,
-Our Supreme Foe in time may much remit
-His anger, and perhaps, thus far removed,
-Not mind us not offending, satisfied
-With what is punished; whence these raging fires
-Will slacken, if his breath stir not their flames.
-Our purer essence then will overcome
-Their noxious vapour; or, inured, not feel;
-Or, changed at length, and to the place conformed
-In temper and in nature, will receive
-Familiar the fierce heat; and, void of pain,
-This horror will grow mild, this darkness light;
-Besides what hope the never-ending flight
-Of future days may bring, what chance, what change
-Worth waiting--since our present lot appears
-For happy though but ill, for ill not worst,
-If we procure not to ourselves more woe."
- Thus Belial, with words clothed in reason's garb,
-Counselled ignoble ease and peaceful sloth,
-Not peace; and after him thus Mammon spake:--
- "Either to disenthrone the King of Heaven
-We war, if war be best, or to regain
-Our own right lost. Him to unthrone we then
-May hope, when everlasting Fate shall yield
-To fickle Chance, and Chaos judge the strife.
-The former, vain to hope, argues as vain
-The latter; for what place can be for us
-Within Heaven's bound, unless Heaven's Lord supreme
-We overpower? Suppose he should relent
-And publish grace to all, on promise made
-Of new subjection; with what eyes could we
-Stand in his presence humble, and receive
-Strict laws imposed, to celebrate his throne
-With warbled hyms, and to his Godhead sing
-Forced hallelujahs, while he lordly sits
-Our envied sovereign, and his altar breathes
-Ambrosial odours and ambrosial flowers,
-Our servile offerings? This must be our task
-In Heaven, this our delight. How wearisome
-Eternity so spent in worship paid
-To whom we hate! Let us not then pursue,
-By force impossible, by leave obtained
-Unacceptable, though in Heaven, our state
-Of splendid vassalage; but rather seek
-Our own good from ourselves, and from our own
-Live to ourselves, though in this vast recess,
-Free and to none accountable, preferring
-Hard liberty before the easy yoke
-Of servile pomp. Our greatness will appear
-Then most conspicuous when great things of small,
-Useful of hurtful, prosperous of adverse,
-We can create, and in what place soe'er
-Thrive under evil, and work ease out of pain
-Through labour and endurance. This deep world
-Of darkness do we dread? How oft amidst
-Thick clouds and dark doth Heaven's all-ruling Sire
-Choose to reside, his glory unobscured,
-And with the majesty of darkness round
-Covers his throne, from whence deep thunders roar.
-Mustering their rage, and Heaven resembles Hell!
-As he our darkness, cannot we his light
-Imitate when we please? This desert soil
-Wants not her hidden lustre, gems and gold;
-Nor want we skill or art from whence to raise
-Magnificence; and what can Heaven show more?
-Our torments also may, in length of time,
-Become our elements, these piercing fires
-As soft as now severe, our temper changed
-Into their temper; which must needs remove
-The sensible of pain. All things invite
-To peaceful counsels, and the settled state
-Of order, how in safety best we may
-Compose our present evils, with regard
-Of what we are and where, dismissing quite
-All thoughts of war. Ye have what I advise."
- He scarce had finished, when such murmur filled
-Th' assembly as when hollow rocks retain
-The sound of blustering winds, which all night long
-Had roused the sea, now with hoarse cadence lull
-Seafaring men o'erwatched, whose bark by chance
-Or pinnace, anchors in a craggy bay
-After the tempest. Such applause was heard
-As Mammon ended, and his sentence pleased,
-Advising peace: for such another field
-They dreaded worse than Hell; so much the fear
-Of thunder and the sword of Michael
-Wrought still within them; and no less desire
-To found this nether empire, which might rise,
-By policy and long process of time,
-In emulation opposite to Heaven.
-Which when Beelzebub perceived--than whom,
-Satan except, none higher sat--with grave
-Aspect he rose, and in his rising seemed
-A pillar of state. Deep on his front engraven
-Deliberation sat, and public care;
-And princely counsel in his face yet shone,
-Majestic, though in ruin. Sage he stood
-With Atlantean shoulders, fit to bear
-The weight of mightiest monarchies; his look
-Drew audience and attention still as night
-Or summer's noontide air, while thus he spake:--
- "Thrones and Imperial Powers, Offspring of Heaven,
-Ethereal Virtues! or these titles now
-Must we renounce, and, changing style, be called
-Princes of Hell? for so the popular vote
-Inclines--here to continue, and build up here
-A growing empire; doubtless! while we dream,
-And know not that the King of Heaven hath doomed
-This place our dungeon, not our safe retreat
-Beyond his potent arm, to live exempt
-From Heaven's high jurisdiction, in new league
-Banded against his throne, but to remain
-In strictest bondage, though thus far removed,
-Under th' inevitable curb, reserved
-His captive multitude. For he, to be sure,
-In height or depth, still first and last will reign
-Sole king, and of his kingdom lose no part
-By our revolt, but over Hell extend
-His empire, and with iron sceptre rule
-Us here, as with his golden those in Heaven.
-What sit we then projecting peace and war?
-War hath determined us and foiled with loss
-Irreparable; terms of peace yet none
-Vouchsafed or sought; for what peace will be given
-To us enslaved, but custody severe,
-And stripes and arbitrary punishment
-Inflicted? and what peace can we return,
-But, to our power, hostility and hate,
-Untamed reluctance, and revenge, though slow,
-Yet ever plotting how the Conqueror least
-May reap his conquest, and may least rejoice
-In doing what we most in suffering feel?
-Nor will occasion want, nor shall we need
-With dangerous expedition to invade
-Heaven, whose high walls fear no assault or siege,
-Or ambush from the Deep. What if we find
-Some easier enterprise? There is a place
-(If ancient and prophetic fame in Heaven
-Err not)--another World, the happy seat
-Of some new race, called Man, about this time
-To be created like to us, though less
-In power and excellence, but favoured more
-Of him who rules above; so was his will
-Pronounced among the Gods, and by an oath
-That shook Heaven's whole circumference confirmed.
-Thither let us bend all our thoughts, to learn
-What creatures there inhabit, of what mould
-Or substance, how endued, and what their power
-And where their weakness: how attempted best,
-By force of subtlety. Though Heaven be shut,
-And Heaven's high Arbitrator sit secure
-In his own strength, this place may lie exposed,
-The utmost border of his kingdom, left
-To their defence who hold it: here, perhaps,
-Some advantageous act may be achieved
-By sudden onset--either with Hell-fire
-To waste his whole creation, or possess
-All as our own, and drive, as we were driven,
-The puny habitants; or, if not drive,
-Seduce them to our party, that their God
-May prove their foe, and with repenting hand
-Abolish his own works. This would surpass
-Common revenge, and interrupt his joy
-In our confusion, and our joy upraise
-In his disturbance; when his darling sons,
-Hurled headlong to partake with us, shall curse
-Their frail original, and faded bliss--
-Faded so soon! Advise if this be worth
-Attempting, or to sit in darkness here
-Hatching vain empires." Thus beelzebub
-Pleaded his devilish counsel--first devised
-By Satan, and in part proposed: for whence,
-But from the author of all ill, could spring
-So deep a malice, to confound the race
-Of mankind in one root, and Earth with Hell
-To mingle and involve, done all to spite
-The great Creator? But their spite still serves
-His glory to augment. The bold design
-Pleased highly those infernal States, and joy
-Sparkled in all their eyes: with full assent
-They vote: whereat his speech he thus renews:--
-"Well have ye judged, well ended long debate,
-Synod of Gods, and, like to what ye are,
-Great things resolved, which from the lowest deep
-Will once more lift us up, in spite of fate,
-Nearer our ancient seat--perhaps in view
-Of those bright confines, whence, with neighbouring arms,
-And opportune excursion, we may chance
-Re-enter Heaven; or else in some mild zone
-Dwell, not unvisited of Heaven's fair light,
-Secure, and at the brightening orient beam
-Purge off this gloom: the soft delicious air,
-To heal the scar of these corrosive fires,
-Shall breathe her balm. But, first, whom shall we send
-In search of this new World? whom shall we find
-Sufficient? who shall tempt with wandering feet
-The dark, unbottomed, infinite Abyss,
-And through the palpable obscure find out
-His uncouth way, or spread his airy flight,
-Upborne with indefatigable wings
-Over the vast abrupt, ere he arrive
-The happy Isle? What strength, what art, can then
-Suffice, or what evasion bear him safe,
-Through the strict senteries and stations thick
-Of Angels watching round? Here he had need
-All circumspection: and we now no less
-Choice in our suffrage; for on whom we send
-The weight of all, and our last hope, relies."
- This said, he sat; and expectation held
-His look suspense, awaiting who appeared
-To second, or oppose, or undertake
-The perilous attempt. But all sat mute,
-Pondering the danger with deep thoughts; and each
-In other's countenance read his own dismay,
-Astonished. None among the choice and prime
-Of those Heaven-warring champions could be found
-So hardy as to proffer or accept,
-Alone, the dreadful voyage; till, at last,
-Satan, whom now transcendent glory raised
-Above his fellows, with monarchal pride
-Conscious of highest worth, unmoved thus spake:--
- "O Progeny of Heaven! Empyreal Thrones!
-With reason hath deep silence and demur
-Seized us, though undismayed. Long is the way
-And hard, that out of Hell leads up to light.
-Our prison strong, this huge convex of fire,
-Outrageous to devour, immures us round
-Ninefold; and gates of burning adamant,
-Barred over us, prohibit all egress.
-These passed, if any pass, the void profound
-Of unessential Night receives him next,
-Wide-gaping, and with utter loss of being
-Threatens him, plunged in that abortive gulf.
-If thence he scape, into whatever world,
-Or unknown region, what remains him less
-Than unknown dangers, and as hard escape?
-But I should ill become this throne, O Peers,
-And this imperial sovereignty, adorned
-With splendour, armed with power, if aught proposed
-And judged of public moment in the shape
-Of difficulty or danger, could deter
-Me from attempting. Wherefore do I assume
-These royalties, and not refuse to reign,
-Refusing to accept as great a share
-Of hazard as of honour, due alike
-To him who reigns, and so much to him due
-Of hazard more as he above the rest
-High honoured sits? Go, therefore, mighty Powers,
-Terror of Heaven, though fallen; intend at home,
-While here shall be our home, what best may ease
-The present misery, and render Hell
-More tolerable; if there be cure or charm
-To respite, or deceive, or slack the pain
-Of this ill mansion: intermit no watch
-Against a wakeful foe, while I abroad
-Through all the coasts of dark destruction seek
-Deliverance for us all. This enterprise
-None shall partake with me." Thus saying, rose
-The Monarch, and prevented all reply;
-Prudent lest, from his resolution raised,
-Others among the chief might offer now,
-Certain to be refused, what erst they feared,
-And, so refused, might in opinion stand
-His rivals, winning cheap the high repute
-Which he through hazard huge must earn. But they
-Dreaded not more th' adventure than his voice
-Forbidding; and at once with him they rose.
-Their rising all at once was as the sound
-Of thunder heard remote. Towards him they bend
-With awful reverence prone, and as a God
-Extol him equal to the Highest in Heaven.
-Nor failed they to express how much they praised
-That for the general safety he despised
-His own: for neither do the Spirits damned
-Lose all their virtue; lest bad men should boast
-Their specious deeds on earth, which glory excites,
-Or close ambition varnished o'er with zeal.
- Thus they their doubtful consultations dark
-Ended, rejoicing in their matchless Chief:
-As, when from mountain-tops the dusky clouds
-Ascending, while the north wind sleeps, o'erspread
-Heaven's cheerful face, the louring element
-Scowls o'er the darkened landscape snow or shower,
-If chance the radiant sun, with farewell sweet,
-Extend his evening beam, the fields revive,
-The birds their notes renew, and bleating herds
-Attest their joy, that hill and valley rings.
-O shame to men! Devil with devil damned
-Firm concord holds; men only disagree
-Of creatures rational, though under hope
-Of heavenly grace, and, God proclaiming peace,
-Yet live in hatred, enmity, and strife
-Among themselves, and levy cruel wars
-Wasting the earth, each other to destroy:
-As if (which might induce us to accord)
-Man had not hellish foes enow besides,
-That day and night for his destruction wait!
- The Stygian council thus dissolved; and forth
-In order came the grand infernal Peers:
-Midst came their mighty Paramount, and seemed
-Alone th' antagonist of Heaven, nor less
-Than Hell's dread Emperor, with pomp supreme,
-And god-like imitated state: him round
-A globe of fiery Seraphim enclosed
-With bright emblazonry, and horrent arms.
-Then of their session ended they bid cry
-With trumpet's regal sound the great result:
-Toward the four winds four speedy Cherubim
-Put to their mouths the sounding alchemy,
-By herald's voice explained; the hollow Abyss
-Heard far adn wide, and all the host of Hell
-With deafening shout returned them loud acclaim.
-Thence more at ease their minds, and somewhat raised
-By false presumptuous hope, the ranged Powers
-Disband; and, wandering, each his several way
-Pursues, as inclination or sad choice
-Leads him perplexed, where he may likeliest find
-Truce to his restless thoughts, and entertain
-The irksome hours, till his great Chief return.
-Part on the plain, or in the air sublime,
-Upon the wing or in swift race contend,
-As at th' Olympian games or Pythian fields;
-Part curb their fiery steeds, or shun the goal
-With rapid wheels, or fronted brigades form:
-As when, to warn proud cities, war appears
-Waged in the troubled sky, and armies rush
-To battle in the clouds; before each van
-Prick forth the airy knights, and couch their spears,
-Till thickest legions close; with feats of arms
-From either end of heaven the welkin burns.
-Others, with vast Typhoean rage, more fell,
-Rend up both rocks and hills, and ride the air
-In whirlwind; Hell scarce holds the wild uproar:--
-As when Alcides, from Oechalia crowned
-With conquest, felt th' envenomed robe, and tore
-Through pain up by the roots Thessalian pines,
-And Lichas from the top of Oeta threw
-Into th' Euboic sea. Others, more mild,
-Retreated in a silent valley, sing
-With notes angelical to many a harp
-Their own heroic deeds, and hapless fall
-By doom of battle, and complain that Fate
-Free Virtue should enthrall to Force or Chance.
-Their song was partial; but the harmony
-(What could it less when Spirits immortal sing?)
-Suspended Hell, and took with ravishment
-The thronging audience. In discourse more sweet
-(For Eloquence the Soul, Song charms the Sense)
-Others apart sat on a hill retired,
-In thoughts more elevate, and reasoned high
-Of Providence, Foreknowledge, Will, and Fate--
-Fixed fate, free will, foreknowledge absolute,
-And found no end, in wandering mazes lost.
-Of good and evil much they argued then,
-Of happiness and final misery,
-Passion and apathy, and glory and shame:
-Vain wisdom all, and false philosophy!--
-Yet, with a pleasing sorcery, could charm
-Pain for a while or anguish, and excite
-Fallacious hope, or arm th' obdured breast
-With stubborn patience as with triple steel.
-Another part, in squadrons and gross bands,
-On bold adventure to discover wide
-That dismal world, if any clime perhaps
-Might yield them easier habitation, bend
-Four ways their flying march, along the banks
-Of four infernal rivers, that disgorge
-Into the burning lake their baleful streams--
-Abhorred Styx, the flood of deadly hate;
-Sad Acheron of sorrow, black and deep;
-Cocytus, named of lamentation loud
-Heard on the rueful stream; fierce Phlegeton,
-Whose waves of torrent fire inflame with rage.
-Far off from these, a slow and silent stream,
-Lethe, the river of oblivion, rolls
-Her watery labyrinth, whereof who drinks
-Forthwith his former state and being forgets--
-Forgets both joy and grief, pleasure and pain.
-Beyond this flood a frozen continent
-Lies dark and wild, beat with perpetual storms
-Of whirlwind and dire hail, which on firm land
-Thaws not, but gathers heap, and ruin seems
-Of ancient pile; all else deep snow and ice,
-A gulf profound as that Serbonian bog
-Betwixt Damiata and Mount Casius old,
-Where armies whole have sunk: the parching air
-Burns frore, and cold performs th' effect of fire.
-Thither, by harpy-footed Furies haled,
-At certain revolutions all the damned
-Are brought; and feel by turns the bitter change
-Of fierce extremes, extremes by change more fierce,
-From beds of raging fire to starve in ice
-Their soft ethereal warmth, and there to pine
-Immovable, infixed, and frozen round
-Periods of time,--thence hurried back to fire.
-They ferry over this Lethean sound
-Both to and fro, their sorrow to augment,
-And wish and struggle, as they pass, to reach
-The tempting stream, with one small drop to lose
-In sweet forgetfulness all pain and woe,
-All in one moment, and so near the brink;
-But Fate withstands, and, to oppose th' attempt,
-Medusa with Gorgonian terror guards
-The ford, and of itself the water flies
-All taste of living wight, as once it fled
-The lip of Tantalus. Thus roving on
-In confused march forlorn, th' adventurous bands,
-With shuddering horror pale, and eyes aghast,
-Viewed first their lamentable lot, and found
-No rest. Through many a dark and dreary vale
-They passed, and many a region dolorous,
-O'er many a frozen, many a fiery alp,
-Rocks, caves, lakes, fens, bogs, dens, and shades of death--
-A universe of death, which God by curse
-Created evil, for evil only good;
-Where all life dies, death lives, and Nature breeds,
-Perverse, all monstrous, all prodigious things,
-Obominable, inutterable, and worse
-Than fables yet have feigned or fear conceived,
-Gorgons, and Hydras, and Chimeras dire.
- Meanwhile the Adversary of God and Man,
-Satan, with thoughts inflamed of highest design,
-Puts on swift wings, and toward the gates of Hell
-Explores his solitary flight: sometimes
-He scours the right hand coast, sometimes the left;
-Now shaves with level wing the deep, then soars
-Up to the fiery concave towering high.
-As when far off at sea a fleet descried
-Hangs in the clouds, by equinoctial winds
-Close sailing from Bengala, or the isles
-Of Ternate and Tidore, whence merchants bring
-Their spicy drugs; they on the trading flood,
-Through the wide Ethiopian to the Cape,
-Ply stemming nightly toward the pole: so seemed
-Far off the flying Fiend. At last appear
-Hell-bounds, high reaching to the horrid roof,
-And thrice threefold the gates; three folds were brass,
-Three iron, three of adamantine rock,
-Impenetrable, impaled with circling fire,
-Yet unconsumed. Before the gates there sat
-On either side a formidable Shape.
-The one seemed woman to the waist, and fair,
-But ended foul in many a scaly fold,
-Voluminous and vast--a serpent armed
-With mortal sting. About her middle round
-A cry of Hell-hounds never-ceasing barked
-With wide Cerberean mouths full loud, and rung
-A hideous peal; yet, when they list, would creep,
-If aught disturbed their noise, into her womb,
-And kennel there; yet there still barked and howled
-Within unseen. Far less abhorred than these
-Vexed Scylla, bathing in the sea that parts
-Calabria from the hoarse Trinacrian shore;
-Nor uglier follow the night-hag, when, called
-In secret, riding through the air she comes,
-Lured with the smell of infant blood, to dance
-With Lapland witches, while the labouring moon
-Eclipses at their charms. The other Shape--
-If shape it might be called that shape had none
-Distinguishable in member, joint, or limb;
-Or substance might be called that shadow seemed,
-For each seemed either--black it stood as Night,
-Fierce as ten Furies, terrible as Hell,
-And shook a dreadful dart: what seemed his head
-The likeness of a kingly crown had on.
-Satan was now at hand, and from his seat
-The monster moving onward came as fast
-With horrid strides; Hell trembled as he strode.
-Th' undaunted Fiend what this might be admired--
-Admired, not feared (God and his Son except,
-Created thing naught valued he nor shunned),
-And with disdainful look thus first began:--
- "Whence and what art thou, execrable Shape,
-That dar'st, though grim and terrible, advance
-Thy miscreated front athwart my way
-To yonder gates? Through them I mean to pass,
-That be assured, without leave asked of thee.
-Retire; or taste thy folly, and learn by proof,
-Hell-born, not to contend with Spirits of Heaven."
- To whom the Goblin, full of wrath, replied:--
-"Art thou that traitor Angel? art thou he,
-Who first broke peace in Heaven and faith, till then
-Unbroken, and in proud rebellious arms
-Drew after him the third part of Heaven's sons,
-Conjured against the Highest--for which both thou
-And they, outcast from God, are here condemned
-To waste eternal days in woe and pain?
-And reckon'st thou thyself with Spirits of Heaven
-Hell-doomed, and breath'st defiance here and scorn,
-Where I reign king, and, to enrage thee more,
-Thy king and lord? Back to thy punishment,
-False fugitive; and to thy speed add wings,
-Lest with a whip of scorpions I pursue
-Thy lingering, or with one stroke of this dart
-Strange horror seize thee, and pangs unfelt before."
- So spake the grisly Terror, and in shape,
-So speaking and so threatening, grew tenfold,
-More dreadful and deform. On th' other side,
-Incensed with indignation, Satan stood
-Unterrified, and like a comet burned,
-That fires the length of Ophiuchus huge
-In th' arctic sky, and from his horrid hair
-Shakes pestilence and war. Each at the head
-Levelled his deadly aim; their fatal hands
-No second stroke intend; and such a frown
-Each cast at th' other as when two black clouds,
-With heaven's artillery fraught, came rattling on
-Over the Caspian,--then stand front to front
-Hovering a space, till winds the signal blow
-To join their dark encounter in mid-air.
-So frowned the mighty combatants that Hell
-Grew darker at their frown; so matched they stood;
-For never but once more was wither like
-To meet so great a foe. And now great deeds
-Had been achieved, whereof all Hell had rung,
-Had not the snaky Sorceress, that sat
-Fast by Hell-gate and kept the fatal key,
-Risen, and with hideous outcry rushed between.
- "O father, what intends thy hand," she cried,
-"Against thy only son? What fury, O son,
-Possesses thee to bend that mortal dart
-Against thy father's head? And know'st for whom?
-For him who sits above, and laughs the while
-At thee, ordained his drudge to execute
-Whate'er his wrath, which he calls justice, bids--
-His wrath, which one day will destroy ye both!"
- She spake, and at her words the hellish Pest
-Forbore: then these to her Satan returned:--
- "So strange thy outcry, and thy words so strange
-Thou interposest, that my sudden hand,
-Prevented, spares to tell thee yet by deeds
-What it intends, till first I know of thee
-What thing thou art, thus double-formed, and why,
-In this infernal vale first met, thou call'st
-Me father, and that phantasm call'st my son.
-I know thee not, nor ever saw till now
-Sight more detestable than him and thee."
- T' whom thus the Portress of Hell-gate replied:--
-"Hast thou forgot me, then; and do I seem
-Now in thine eye so foul?--once deemed so fair
-In Heaven, when at th' assembly, and in sight
-Of all the Seraphim with thee combined
-In bold conspiracy against Heaven's King,
-All on a sudden miserable pain
-Surprised thee, dim thine eyes and dizzy swum
-In darkness, while thy head flames thick and fast
-Threw forth, till on the left side opening wide,
-Likest to thee in shape and countenance bright,
-Then shining heavenly fair, a goddess armed,
-Out of thy head I sprung. Amazement seized
-All th' host of Heaven; back they recoiled afraid
-At first, and called me Sin, and for a sign
-Portentous held me; but, familiar grown,
-I pleased, and with attractive graces won
-The most averse--thee chiefly, who, full oft
-Thyself in me thy perfect image viewing,
-Becam'st enamoured; and such joy thou took'st
-With me in secret that my womb conceived
-A growing burden. Meanwhile war arose,
-And fields were fought in Heaven: wherein remained
-(For what could else?) to our Almighty Foe
-Clear victory; to our part loss and rout
-Through all the Empyrean. Down they fell,
-Driven headlong from the pitch of Heaven, down
-Into this Deep; and in the general fall
-I also: at which time this powerful key
-Into my hands was given, with charge to keep
-These gates for ever shut, which none can pass
-Without my opening. Pensive here I sat
-Alone; but long I sat not, till my womb,
-Pregnant by thee, and now excessive grown,
-Prodigious motion felt and rueful throes.
-At last this odious offspring whom thou seest,
-Thine own begotten, breaking violent way,
-Tore through my entrails, that, with fear and pain
-Distorted, all my nether shape thus grew
-Transformed: but he my inbred enemy
-Forth issued, brandishing his fatal dart,
-Made to destroy. I fled, and cried out Death!
-Hell trembled at the hideous name, and sighed
-From all her caves, and back resounded Death!
-I fled; but he pursued (though more, it seems,
-Inflamed with lust than rage), and, swifter far,
-Me overtook, his mother, all dismayed,
-And, in embraces forcible and foul
-Engendering with me, of that rape begot
-These yelling monsters, that with ceaseless cry
-Surround me, as thou saw'st--hourly conceived
-And hourly born, with sorrow infinite
-To me; for, when they list, into the womb
-That bred them they return, and howl, and gnaw
-My bowels, their repast; then, bursting forth
-Afresh, with conscious terrors vex me round,
-That rest or intermission none I find.
-Before mine eyes in opposition sits
-Grim Death, my son and foe, who set them on,
-And me, his parent, would full soon devour
-For want of other prey, but that he knows
-His end with mine involved, and knows that I
-Should prove a bitter morsel, and his bane,
-Whenever that shall be: so Fate pronounced.
-But thou, O father, I forewarn thee, shun
-His deadly arrow; neither vainly hope
-To be invulnerable in those bright arms,
-Through tempered heavenly; for that mortal dint,
-Save he who reigns above, none can resist."
- She finished; and the subtle Fiend his lore
-Soon learned, now milder, and thus answered smooth:--
- "Dear daughter--since thou claim'st me for thy sire,
-And my fair son here show'st me, the dear pledge
-Of dalliance had with thee in Heaven, and joys
-Then sweet, now sad to mention, through dire change
-Befallen us unforeseen, unthought-of--know,
-I come no enemy, but to set free
-From out this dark and dismal house of pain
-Both him and thee, and all the heavenly host
-Of Spirits that, in our just pretences armed,
-Fell with us from on high. From them I go
-This uncouth errand sole, and one for all
-Myself expose, with lonely steps to tread
-Th' unfounded Deep, and through the void immense
-To search, with wandering quest, a place foretold
-Should be--and, by concurring signs, ere now
-Created vast and round--a place of bliss
-In the purlieus of Heaven; and therein placed
-A race of upstart creatures, to supply
-Perhaps our vacant room, though more removed,
-Lest Heaven, surcharged with potent multitude,
-Might hap to move new broils. Be this, or aught
-Than this more secret, now designed, I haste
-To know; and, this once known, shall soon return,
-And bring ye to the place where thou and Death
-Shall dwell at ease, and up and down unseen
-Wing silently the buxom air, embalmed
-With odours. There ye shall be fed and filled
-Immeasurably; all things shall be your prey."
- He ceased; for both seemed highly pleased, and Death
-Grinned horrible a ghastly smile, to hear
-His famine should be filled, and blessed his maw
-Destined to that good hour. No less rejoiced
-His mother bad, and thus bespake her sire:--
- "The key of this infernal Pit, by due
-And by command of Heaven's all-powerful King,
-I keep, by him forbidden to unlock
-These adamantine gates; against all force
-Death ready stands to interpose his dart,
-Fearless to be o'ermatched by living might.
-But what owe I to his commands above,
-Who hates me, and hath hither thrust me down
-Into this gloom of Tartarus profound,
-To sit in hateful office here confined,
-Inhabitant of Heaven and heavenly born--
-Here in perpetual agony and pain,
-With terrors and with clamours compassed round
-Of mine own brood, that on my bowels feed?
-Thou art my father, thou my author, thou
-My being gav'st me; whom should I obey
-But thee? whom follow? Thou wilt bring me soon
-To that new world of light and bliss, among
-The gods who live at ease, where I shall reign
-At thy right hand voluptuous, as beseems
-Thy daughter and thy darling, without end."
- Thus saying, from her side the fatal key,
-Sad instrument of all our woe, she took;
-And, towards the gate rolling her bestial train,
-Forthwith the huge portcullis high up-drew,
-Which, but herself, not all the Stygian Powers
-Could once have moved; then in the key-hole turns
-Th' intricate wards, and every bolt and bar
-Of massy iron or solid rock with ease
-Unfastens. On a sudden open fly,
-With impetuous recoil and jarring sound,
-Th' infernal doors, and on their hinges grate
-Harsh thunder, that the lowest bottom shook
-Of Erebus. She opened; but to shut
-Excelled her power: the gates wide open stood,
-That with extended wings a bannered host,
-Under spread ensigns marching, mibht pass through
-With horse and chariots ranked in loose array;
-So wide they stood, and like a furnace-mouth
-Cast forth redounding smoke and ruddy flame.
-Before their eyes in sudden view appear
-The secrets of the hoary Deep--a dark
-Illimitable ocean, without bound,
-Without dimension; where length, breadth, and height,
-And time, and place, are lost; where eldest Night
-And Chaos, ancestors of Nature, hold
-Eternal anarchy, amidst the noise
-Of endless wars, and by confusion stand.
-For Hot, Cold, Moist, and Dry, four champions fierce,
-Strive here for mastery, and to battle bring
-Their embryon atoms: they around the flag
-Of each his faction, in their several clans,
-Light-armed or heavy, sharp, smooth, swift, or slow,
-Swarm populous, unnumbered as the sands
-Of Barca or Cyrene's torrid soil,
-Levied to side with warring winds, and poise
-Their lighter wings. To whom these most adhere
-He rules a moment: Chaos umpire sits,
-And by decision more embroils the fray
-By which he reigns: next him, high arbiter,
-Chance governs all. Into this wild Abyss,
-The womb of Nature, and perhaps her grave,
-Of neither sea, nor shore, nor air, nor fire,
-But all these in their pregnant causes mixed
-Confusedly, and which thus must ever fight,
-Unless th' Almighty Maker them ordain
-His dark materials to create more worlds--
-Into this wild Abyss the wary Fiend
-Stood on the brink of Hell and looked a while,
-Pondering his voyage; for no narrow frith
-He had to cross. Nor was his ear less pealed
-With noises loud and ruinous (to compare
-Great things with small) than when Bellona storms
-With all her battering engines, bent to rase
-Some capital city; or less than if this frame
-Of Heaven were falling, and these elements
-In mutiny had from her axle torn
-The steadfast Earth. At last his sail-broad vans
-He spread for flight, and, in the surging smoke
-Uplifted, spurns the ground; thence many a league,
-As in a cloudy chair, ascending rides
-Audacious; but, that seat soon failing, meets
-A vast vacuity. All unawares,
-Fluttering his pennons vain, plumb-down he drops
-Ten thousand fathom deep, and to this hour
-Down had been falling, had not, by ill chance,
-The strong rebuff of some tumultuous cloud,
-Instinct with fire and nitre, hurried him
-As many miles aloft. That fury stayed--
-Quenched in a boggy Syrtis, neither sea,
-Nor good dry land--nigh foundered, on he fares,
-Treading the crude consistence, half on foot,
-Half flying; behoves him now both oar and sail.
-As when a gryphon through the wilderness
-With winged course, o'er hill or moory dale,
-Pursues the Arimaspian, who by stealth
-Had from his wakeful custody purloined
-The guarded gold; so eagerly the Fiend
-O'er bog or steep, through strait, rough, dense, or rare,
-With head, hands, wings, or feet, pursues his way,
-And swims, or sinks, or wades, or creeps, or flies.
-At length a universal hubbub wild
-Of stunning sounds, and voices all confused,
-Borne through the hollow dark, assaults his ear
-With loudest vehemence. Thither he plies
-Undaunted, to meet there whatever Power
-Or Spirit of the nethermost Abyss
-Might in that noise reside, of whom to ask
-Which way the nearest coast of darkness lies
-Bordering on light; when straight behold the throne
-Of Chaos, and his dark pavilion spread
-Wide on the wasteful Deep! With him enthroned
-Sat sable-vested Night, eldest of things,
-The consort of his reign; and by them stood
-Orcus and Ades, and the dreaded name
-Of Demogorgon; Rumour next, and Chance,
-And Tumult, and Confusion, all embroiled,
-And Discord with a thousand various mouths.
- T' whom Satan, turning boldly, thus:--"Ye Powers
-And Spirtis of this nethermost Abyss,
-Chaos and ancient Night, I come no spy
-With purpose to explore or to disturb
-The secrets of your realm; but, by constraint
-Wandering this darksome desert, as my way
-Lies through your spacious empire up to light,
-Alone and without guide, half lost, I seek,
-What readiest path leads where your gloomy bounds
-Confine with Heaven; or, if some other place,
-From your dominion won, th' Ethereal King
-Possesses lately, thither to arrive
-I travel this profound. Direct my course:
-Directed, no mean recompense it brings
-To your behoof, if I that region lost,
-All usurpation thence expelled, reduce
-To her original darkness and your sway
-(Which is my present journey), and once more
-Erect the standard there of ancient Night.
-Yours be th' advantage all, mine the revenge!"
- Thus Satan; and him thus the Anarch old,
-With faltering speech and visage incomposed,
-Answered: "I know thee, stranger, who thou art-- ***
-That mighty leading Angel, who of late
-Made head against Heaven's King, though overthrown.
-I saw and heard; for such a numerous host
-Fled not in silence through the frighted Deep,
-With ruin upon ruin, rout on rout,
-Confusion worse confounded; and Heaven-gates
-Poured out by millions her victorious bands,
-Pursuing. I upon my frontiers here
-Keep residence; if all I can will serve
-That little which is left so to defend,
-Encroached on still through our intestine broils
-Weakening the sceptre of old Night: first, Hell,
-Your dungeon, stretching far and wide beneath;
-Now lately Heaven and Earth, another world
-Hung o'er my realm, linked in a golden chain
-To that side Heaven from whence your legions fell!
-If that way be your walk, you have not far;
-So much the nearer danger. Go, and speed;
-Havoc, and spoil, and ruin, are my gain."
- He ceased; and Satan stayed not to reply,
-But, glad that now his sea should find a shore,
-With fresh alacrity and force renewed
-Springs upward, like a pyramid of fire,
-Into the wild expanse, and through the shock
-Of fighting elements, on all sides round
-Environed, wins his way; harder beset
-And more endangered than when Argo passed
-Through Bosporus betwixt the justling rocks,
-Or when Ulysses on the larboard shunned
-Charybdis, and by th' other whirlpool steered.
-So he with difficulty and labour hard
-Moved on, with difficulty and labour he;
-But, he once passed, soon after, when Man fell,
-Strange alteration! Sin and Death amain,
-Following his track (such was the will of Heaven)
-Paved after him a broad and beaten way
-Over the dark Abyss, whose boiling gulf
-Tamely endured a bridge of wondrous length,
-From Hell continued, reaching th' utmost orb
-Of this frail World; by which the Spirits perverse
-With easy intercourse pass to and fro
-To tempt or punish mortals, except whom
-God and good Angels guard by special grace.
- But now at last the sacred influence
-Of light appears, and from the walls of Heaven
-Shoots far into the bosom of dim Night
-A glimmering dawn. Here Nature first begins
-Her farthest verge, and Chaos to retire,
-As from her outmost works, a broken foe,
-With tumult less and with less hostile din;
-That Satan with less toil, and now with ease,
-Wafts on the calmer wave by dubious light,
-And, like a weather-beaten vessel, holds
-Gladly the port, though shrouds and tackle torn;
-Or in the emptier waste, resembling air,
-Weighs his spread wings, at leisure to behold
-Far off th' empyreal Heaven, extended wide
-In circuit, undetermined square or round,
-With opal towers and battlements adorned
-Of living sapphire, once his native seat;
-And, fast by, hanging in a golden chain,
-This pendent World, in bigness as a star
-Of smallest magnitude close by the moon.
-Thither, full fraught with mischievous revenge,
-Accursed, and in a cursed hour, he hies.
-
-
-
-Book III
-
<TRUNCATED>
[47/51] [partial] orc git commit: ORC-204 Update and use CMake
External Project to build C++ compression libraries.
Posted by om...@apache.org.
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/lz4-r131/lz4_Frame_format.md
----------------------------------------------------------------------
diff --git a/c++/libs/lz4-r131/lz4_Frame_format.md b/c++/libs/lz4-r131/lz4_Frame_format.md
deleted file mode 100644
index 73d3cba..0000000
--- a/c++/libs/lz4-r131/lz4_Frame_format.md
+++ /dev/null
@@ -1,385 +0,0 @@
-LZ4 Frame Format Description
-============================
-
-###Notices
-
-Copyright (c) 2013-2015 Yann Collet
-
-Permission is granted to copy and distribute this document
-for any purpose and without charge,
-including translations into other languages
-and incorporation into compilations,
-provided that the copyright notice and this notice are preserved,
-and that any substantive changes or deletions from the original
-are clearly marked.
-Distribution of this document is unlimited.
-
-###Version
-
-1.5.1 (31/03/2015)
-
-
-Introduction
-------------
-
-The purpose of this document is to define a lossless compressed data format,
-that is independent of CPU type, operating system,
-file system and character set, suitable for
-File compression, Pipe and streaming compression
-using the [LZ4 algorithm](http://www.lz4.info).
-
-The data can be produced or consumed,
-even for an arbitrarily long sequentially presented input data stream,
-using only an a priori bounded amount of intermediate storage,
-and hence can be used in data communications.
-The format uses the LZ4 compression method,
-and optional [xxHash-32 checksum method](https://github.com/Cyan4973/xxHash),
-for detection of data corruption.
-
-The data format defined by this specification
-does not attempt to allow random access to compressed data.
-
-This specification is intended for use by implementers of software
-to compress data into LZ4 format and/or decompress data from LZ4 format.
-The text of the specification assumes a basic background in programming
-at the level of bits and other primitive data representations.
-
-Unless otherwise indicated below,
-a compliant compressor must produce data sets
-that conform to the specifications presented here.
-It doesn’t need to support all options though.
-
-A compliant decompressor must be able to decompress
-at least one working set of parameters
-that conforms to the specifications presented here.
-It may also ignore checksums.
-Whenever it does not support a specific parameter within the compressed stream,
-it must produce a non-ambiguous error code
-and associated error message explaining which parameter is unsupported.
-
-
-General Structure of LZ4 Frame format
--------------------------------------
-
-| MagicNb | F. Descriptor | Block | (...) | EndMark | C. Checksum |
-|:-------:|:-------------:| ----- | ----- | ------- | ----------- |
-| 4 bytes | 3-11 bytes | | | 4 bytes | 4 bytes |
-
-__Magic Number__
-
-4 Bytes, Little endian format.
-Value : 0x184D2204
-
-__Frame Descriptor__
-
-3 to 11 Bytes, to be detailed in the next part.
-Most important part of the spec.
-
-__Data Blocks__
-
-To be detailed later on.
-That’s where compressed data is stored.
-
-__EndMark__
-
-The flow of blocks ends when the last data block has a size of “0”.
-The size is expressed as a 32-bits value.
-
-__Content Checksum__
-
-Content Checksum verify that the full content has been decoded correctly.
-The content checksum is the result
-of [xxh32() hash function](https://github.com/Cyan4973/xxHash)
-digesting the original (decoded) data as input, and a seed of zero.
-Content checksum is only present when its associated flag
-is set in the frame descriptor.
-Content Checksum validates the result,
-that all blocks were fully transmitted in the correct order and without error,
-and also that the encoding/decoding process itself generated no distortion.
-Its usage is recommended.
-
-__Frame Concatenation__
-
-In some circumstances, it may be preferable to append multiple frames,
-for example in order to add new data to an existing compressed file
-without re-framing it.
-
-In such case, each frame has its own set of descriptor flags.
-Each frame is considered independent.
-The only relation between frames is their sequential order.
-
-The ability to decode multiple concatenated frames
-within a single stream or file
-is left outside of this specification.
-As an example, the reference lz4 command line utility behavior is
-to decode all concatenated frames in their sequential order.
-
-
-Frame Descriptor
-----------------
-
-| FLG | BD | (Content Size) | HC |
-| ------- | ------- |:--------------:| ------- |
-| 1 byte | 1 byte | 0 - 8 bytes | 1 byte |
-
-The descriptor uses a minimum of 3 bytes,
-and up to 11 bytes depending on optional parameters.
-
-__FLG byte__
-
-| BitNb | 7-6 | 5 | 4 | 3 | 2 | 1-0 |
-| ------- | ------- | ------- | --------- | ------- | --------- | -------- |
-|FieldName| Version | B.Indep | B.Checksum| C.Size | C.Checksum|*Reserved*|
-
-
-__BD byte__
-
-| BitNb | 7 | 6-5-4 | 3-2-1-0 |
-| ------- | -------- | ------------ | -------- |
-|FieldName|*Reserved*| Block MaxSize|*Reserved*|
-
-In the tables, bit 7 is highest bit, while bit 0 is lowest.
-
-__Version Number__
-
-2-bits field, must be set to “01”.
-Any other value cannot be decoded by this version of the specification.
-Other version numbers will use different flag layouts.
-
-__Block Independence flag__
-
-If this flag is set to “1”, blocks are independent.
-If this flag is set to “0”, each block depends on previous ones
-(up to LZ4 window size, which is 64 KB).
-In such case, it’s necessary to decode all blocks in sequence.
-
-Block dependency improves compression ratio, especially for small blocks.
-On the other hand, it makes direct jumps or multi-threaded decoding impossible.
-
-__Block checksum flag__
-
-If this flag is set, each data block will be followed by a 4-bytes checksum,
-calculated by using the xxHash-32 algorithm on the raw (compressed) data block.
-The intention is to detect data corruption (storage or transmission errors)
-immediately, before decoding.
-Block checksum usage is optional.
-
-__Content Size flag__
-
-If this flag is set, the uncompressed size of data included within the frame
-will be present as an 8 bytes unsigned little endian value, after the flags.
-Content Size usage is optional.
-
-__Content checksum flag__
-
-If this flag is set, a content checksum will be appended after the EndMark.
-
-Recommended value : “1” (content checksum is present)
-
-__Block Maximum Size__
-
-This information is intended to help the decoder allocate memory.
-Size here refers to the original (uncompressed) data size.
-Block Maximum Size is one value among the following table :
-
-| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
-| --- | --- | --- | --- | ----- | ------ | ---- | ---- |
-| N/A | N/A | N/A | N/A | 64 KB | 256 KB | 1 MB | 4 MB |
-
-The decoder may refuse to allocate block sizes above a (system-specific) size.
-Unused values may be used in a future revision of the spec.
-A decoder conformant to the current version of the spec
-is only able to decode blocksizes defined in this spec.
-
-__Reserved bits__
-
-Value of reserved bits **must** be 0 (zero).
-Reserved bit might be used in a future version of the specification,
-typically enabling new optional features.
-If this happens, a decoder respecting the current version of the specification
-shall not be able to decode such a frame.
-
-__Content Size__
-
-This is the original (uncompressed) size.
-This information is optional, and only present if the associated flag is set.
-Content size is provided using unsigned 8 Bytes, for a maximum of 16 HexaBytes.
-Format is Little endian.
-This value is informational, typically for display or memory allocation.
-It can be skipped by a decoder, or used to validate content correctness.
-
-__Header Checksum__
-
-One-byte checksum of combined descriptor fields, including optional ones.
-The value is the second byte of xxh32() : ` (xxh32()>>8) & 0xFF `
-using zero as a seed,
-and the full Frame Descriptor as an input
-(including optional fields when they are present).
-A wrong checksum indicates an error in the descriptor.
-Header checksum is informational and can be skipped.
-
-
-Data Blocks
------------
-
-| Block Size | data | (Block Checksum) |
-|:----------:| ------ |:----------------:|
-| 4 bytes | | 0 - 4 bytes |
-
-
-__Block Size__
-
-This field uses 4-bytes, format is little-endian.
-
-The highest bit is “1” if data in the block is uncompressed.
-
-The highest bit is “0” if data in the block is compressed by LZ4.
-
-All other bits give the size, in bytes, of the following data block
-(the size does not include the block checksum if present).
-
-Block Size shall never be larger than Block Maximum Size.
-Such a thing could happen for incompressible source data.
-In such case, such a data block shall be passed in uncompressed format.
-
-__Data__
-
-Where the actual data to decode stands.
-It might be compressed or not, depending on previous field indications.
-Uncompressed size of Data can be any size, up to “block maximum size”.
-Note that data block is not necessarily full :
-an arbitrary “flush” may happen anytime. Any block can be “partially filled”.
-
-__Block checksum__
-
-Only present if the associated flag is set.
-This is a 4-bytes checksum value, in little endian format,
-calculated by using the xxHash-32 algorithm on the raw (undecoded) data block,
-and a seed of zero.
-The intention is to detect data corruption (storage or transmission errors)
-before decoding.
-
-Block checksum is cumulative with Content checksum.
-
-
-Skippable Frames
-----------------
-
-| Magic Number | Frame Size | User Data |
-|:------------:|:----------:| --------- |
-| 4 bytes | 4 bytes | |
-
-Skippable frames allow the integration of user-defined data
-into a flow of concatenated frames.
-Its design is pretty straightforward,
-with the sole objective to allow the decoder to quickly skip
-over user-defined data and continue decoding.
-
-For the purpose of facilitating identification,
-it is discouraged to start a flow of concatenated frames with a skippable frame.
-If there is a need to start such a flow with some user data
-encapsulated into a skippable frame,
-it’s recommended to start with a zero-byte LZ4 frame
-followed by a skippable frame.
-This will make it easier for file type identifiers.
-
-
-__Magic Number__
-
-4 Bytes, Little endian format.
-Value : 0x184D2A5X, which means any value from 0x184D2A50 to 0x184D2A5F.
-All 16 values are valid to identify a skippable frame.
-
-__Frame Size__
-
-This is the size, in bytes, of the following User Data
-(without including the magic number nor the size field itself).
-4 Bytes, Little endian format, unsigned 32-bits.
-This means User Data can’t be bigger than (2^32-1) Bytes.
-
-__User Data__
-
-User Data can be anything. Data will just be skipped by the decoder.
-
-
-Legacy frame
-------------
-
-The Legacy frame format was defined into the initial versions of “LZ4Demo”.
-Newer compressors should not use this format anymore, as it is too restrictive.
-
-Main characteristics of the legacy format :
-
-- Fixed block size : 8 MB.
-- All blocks must be completely filled, except the last one.
-- All blocks are always compressed, even when compression is detrimental.
-- The last block is detected either because
- it is followed by the “EOF” (End of File) mark,
- or because it is followed by a known Frame Magic Number.
-- No checksum
-- Convention is Little endian
-
-| MagicNb | B.CSize | CData | B.CSize | CData | (...) | EndMark |
-| ------- | ------- | ----- | ------- | ----- | ------- | ------- |
-| 4 bytes | 4 bytes | CSize | 4 bytes | CSize | x times | EOF |
-
-
-__Magic Number__
-
-4 Bytes, Little endian format.
-Value : 0x184C2102
-
-__Block Compressed Size__
-
-This is the size, in bytes, of the following compressed data block.
-4 Bytes, Little endian format.
-
-__Data__
-
-Where the actual compressed data stands.
-Data is always compressed, even when compression is detrimental.
-
-__EndMark__
-
-End of legacy frame is implicit only.
-It must be followed by a standard EOF (End Of File) signal,
-wether it is a file or a stream.
-
-Alternatively, if the frame is followed by a valid Frame Magic Number,
-it is considered completed.
-It makes legacy frames compatible with frame concatenation.
-
-Any other value will be interpreted as a block size,
-and trigger an error if it does not fit within acceptable range.
-
-
-Version changes
----------------
-
-1.5.1 : changed format to MarkDown compatible
-
-1.5 : removed Dictionary ID from specification
-
-1.4.1 : changed wording from “stream” to “frame”
-
-1.4 : added skippable streams, re-added stream checksum
-
-1.3 : modified header checksum
-
-1.2 : reduced choice of “block size”, to postpone decision on “dynamic size of BlockSize Field”.
-
-1.1 : optional fields are now part of the descriptor
-
-1.0 : changed “block size” specification, adding a compressed/uncompressed flag
-
-0.9 : reduced scale of “block maximum size” table
-
-0.8 : removed : high compression flag
-
-0.7 : removed : stream checksum
-
-0.6 : settled : stream size uses 8 bytes, endian convention is little endian
-
-0.5: added copyright notice
-
-0.4 : changed format to Google Doc compatible OpenDocument
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/snappy-1.1.2/AUTHORS
----------------------------------------------------------------------
diff --git a/c++/libs/snappy-1.1.2/AUTHORS b/c++/libs/snappy-1.1.2/AUTHORS
deleted file mode 100644
index 4858b37..0000000
--- a/c++/libs/snappy-1.1.2/AUTHORS
+++ /dev/null
@@ -1 +0,0 @@
-opensource@google.com
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/snappy-1.1.2/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/c++/libs/snappy-1.1.2/CMakeLists.txt b/c++/libs/snappy-1.1.2/CMakeLists.txt
deleted file mode 100644
index 684b064..0000000
--- a/c++/libs/snappy-1.1.2/CMakeLists.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-add_library (snappy STATIC
- snappy.cc
- snappy-sinksource.cc
- snappy-stubs-internal.cc
- snappy-c.cc
- )
-
-install (TARGETS snappy DESTINATION lib)
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/snappy-1.1.2/COPYING
----------------------------------------------------------------------
diff --git a/c++/libs/snappy-1.1.2/COPYING b/c++/libs/snappy-1.1.2/COPYING
deleted file mode 100644
index 4816c43..0000000
--- a/c++/libs/snappy-1.1.2/COPYING
+++ /dev/null
@@ -1,54 +0,0 @@
-Copyright 2011, Google Inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-===
-
-Some of the benchmark data in util/zippy/testdata is licensed differently:
-
- - fireworks.jpeg is Copyright 2013 Steinar H. Gunderson, and
- is licensed under the Creative Commons Attribution 3.0 license
- (CC-BY-3.0). See https://creativecommons.org/licenses/by/3.0/
- for more information.
-
- - kppkn.gtb is taken from the Gaviota chess tablebase set, and
- is licensed under the MIT License. See
- https://sites.google.com/site/gaviotachessengine/Home/endgame-tablebases-1
- for more information.
-
- - paper-100k.pdf is an excerpt (bytes 92160 to 194560) from the paper
- “Combinatorial Modeling of Chromatin Features Quantitatively Predicts DNA
- Replication Timing in _Drosophila_” by Federico Comoglio and Renato Paro,
- which is licensed under the CC-BY license. See
- http://www.ploscompbiol.org/static/license for more ifnormation.
-
- - alice29.txt, asyoulik.txt, plrabn12.txt and lcet10.txt are from Project
- Gutenberg. The first three have expired copyrights and are in the public
- domain; the latter does not have expired copyright, but is still in the
- public domain according to the license information
- (http://www.gutenberg.org/ebooks/53).
[51/51] [partial] orc git commit: ORC-204 Update and use CMake
External Project to build C++ compression libraries.
Posted by om...@apache.org.
ORC-204 Update and use CMake External Project to build C++ compression
libraries.
Fixes #135
Signed-off-by: Owen O'Malley <om...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/orc/repo
Commit: http://git-wip-us.apache.org/repos/asf/orc/commit/590245a0
Tree: http://git-wip-us.apache.org/repos/asf/orc/tree/590245a0
Diff: http://git-wip-us.apache.org/repos/asf/orc/diff/590245a0
Branch: refs/heads/master
Commit: 590245a0b876f08d278cef26f8d4bcc1e483789f
Parents: aa67697
Author: Deepak Majeti <de...@hpe.com>
Authored: Mon Jul 10 12:43:47 2017 -0400
Committer: Owen O'Malley <om...@apache.org>
Committed: Mon Jul 24 10:48:25 2017 -0700
----------------------------------------------------------------------
CMakeLists.txt | 23 +-
c++/libs/CMakeLists.txt | 3 -
c++/libs/lz4-r131/CMakeLists.txt | 23 -
c++/libs/lz4-r131/NEWS | 178 -
c++/libs/lz4-r131/README.md | 88 -
c++/libs/lz4-r131/lib/LICENSE | 24 -
c++/libs/lz4-r131/lib/Makefile | 117 -
c++/libs/lz4-r131/lib/README.md | 21 -
c++/libs/lz4-r131/lib/liblz4.pc.in | 14 -
c++/libs/lz4-r131/lib/lz4.c | 1516 --
c++/libs/lz4-r131/lib/lz4.h | 360 -
c++/libs/lz4-r131/lib/lz4frame.c | 1479 --
c++/libs/lz4-r131/lib/lz4frame.h | 303 -
c++/libs/lz4-r131/lib/lz4frame_static.h | 81 -
c++/libs/lz4-r131/lib/lz4hc.c | 731 -
c++/libs/lz4-r131/lib/lz4hc.h | 189 -
c++/libs/lz4-r131/lib/xxhash.c | 915 -
c++/libs/lz4-r131/lib/xxhash.h | 192 -
c++/libs/lz4-r131/lz4_Block_format.md | 127 -
c++/libs/lz4-r131/lz4_Frame_format.md | 385 -
c++/libs/snappy-1.1.2/AUTHORS | 1 -
c++/libs/snappy-1.1.2/CMakeLists.txt | 20 -
c++/libs/snappy-1.1.2/COPYING | 54 -
c++/libs/snappy-1.1.2/ChangeLog | 1916 --
c++/libs/snappy-1.1.2/INSTALL | 370 -
c++/libs/snappy-1.1.2/Makefile.am | 23 -
c++/libs/snappy-1.1.2/Makefile.in | 957 -
c++/libs/snappy-1.1.2/NEWS | 128 -
c++/libs/snappy-1.1.2/README | 135 -
c++/libs/snappy-1.1.2/aclocal.m4 | 9738 ---------
c++/libs/snappy-1.1.2/autogen.sh | 7 -
c++/libs/snappy-1.1.2/config.guess | 1530 --
c++/libs/snappy-1.1.2/config.h | 125 -
c++/libs/snappy-1.1.2/config.h.in | 124 -
c++/libs/snappy-1.1.2/config.sub | 1773 --
c++/libs/snappy-1.1.2/configure | 18851 -----------------
c++/libs/snappy-1.1.2/configure.ac | 133 -
c++/libs/snappy-1.1.2/depcomp | 688 -
c++/libs/snappy-1.1.2/format_description.txt | 110 -
c++/libs/snappy-1.1.2/framing_format.txt | 135 -
c++/libs/snappy-1.1.2/install-sh | 527 -
c++/libs/snappy-1.1.2/ltmain.sh | 9661 ---------
c++/libs/snappy-1.1.2/m4/gtest.m4 | 74 -
c++/libs/snappy-1.1.2/missing | 331 -
c++/libs/snappy-1.1.2/snappy-c.cc | 90 -
c++/libs/snappy-1.1.2/snappy-c.h | 138 -
c++/libs/snappy-1.1.2/snappy-internal.h | 150 -
c++/libs/snappy-1.1.2/snappy-sinksource.cc | 71 -
c++/libs/snappy-1.1.2/snappy-sinksource.h | 137 -
c++/libs/snappy-1.1.2/snappy-stubs-internal.cc | 42 -
c++/libs/snappy-1.1.2/snappy-stubs-internal.h | 491 -
c++/libs/snappy-1.1.2/snappy-stubs-public.h | 98 -
c++/libs/snappy-1.1.2/snappy-stubs-public.h.in | 98 -
c++/libs/snappy-1.1.2/snappy-test.cc | 606 -
c++/libs/snappy-1.1.2/snappy-test.h | 582 -
c++/libs/snappy-1.1.2/snappy.cc | 1306 --
c++/libs/snappy-1.1.2/snappy.h | 184 -
c++/libs/snappy-1.1.2/snappy_unittest.cc | 1355 --
c++/libs/snappy-1.1.2/testdata/alice29.txt | 3609 ----
c++/libs/snappy-1.1.2/testdata/asyoulik.txt | 4122 ----
c++/libs/snappy-1.1.2/testdata/html | 1 -
c++/libs/snappy-1.1.2/testdata/html_x_4 | 1 -
c++/libs/snappy-1.1.2/testdata/lcet10.txt | 7519 -------
c++/libs/snappy-1.1.2/testdata/paper-100k.pdf | 598 -
c++/libs/snappy-1.1.2/testdata/plrabn12.txt | 10699 ----------
c++/libs/snappy-1.1.2/testdata/urls.10K | 10000 ---------
c++/libs/zlib-1.2.8/CMakeLists.txt | 200 -
c++/libs/zlib-1.2.8/ChangeLog | 1472 --
c++/libs/zlib-1.2.8/FAQ | 368 -
c++/libs/zlib-1.2.8/INDEX | 68 -
c++/libs/zlib-1.2.8/Makefile | 5 -
c++/libs/zlib-1.2.8/Makefile.in | 288 -
c++/libs/zlib-1.2.8/README | 115 -
c++/libs/zlib-1.2.8/adler32.c | 179 -
c++/libs/zlib-1.2.8/amiga/Makefile.pup | 69 -
c++/libs/zlib-1.2.8/amiga/Makefile.sas | 68 -
c++/libs/zlib-1.2.8/as400/bndsrc | 215 -
c++/libs/zlib-1.2.8/as400/compile.clp | 110 -
c++/libs/zlib-1.2.8/as400/readme.txt | 115 -
c++/libs/zlib-1.2.8/as400/zlib.inc | 451 -
c++/libs/zlib-1.2.8/compress.c | 80 -
c++/libs/zlib-1.2.8/configure | 831 -
c++/libs/zlib-1.2.8/contrib/README.contrib | 78 -
c++/libs/zlib-1.2.8/contrib/ada/buffer_demo.adb | 106 -
c++/libs/zlib-1.2.8/contrib/ada/mtest.adb | 156 -
c++/libs/zlib-1.2.8/contrib/ada/read.adb | 156 -
c++/libs/zlib-1.2.8/contrib/ada/readme.txt | 65 -
c++/libs/zlib-1.2.8/contrib/ada/test.adb | 463 -
.../zlib-1.2.8/contrib/ada/zlib-streams.adb | 225 -
.../zlib-1.2.8/contrib/ada/zlib-streams.ads | 114 -
c++/libs/zlib-1.2.8/contrib/ada/zlib-thin.adb | 141 -
c++/libs/zlib-1.2.8/contrib/ada/zlib-thin.ads | 450 -
c++/libs/zlib-1.2.8/contrib/ada/zlib.adb | 701 -
c++/libs/zlib-1.2.8/contrib/ada/zlib.ads | 328 -
c++/libs/zlib-1.2.8/contrib/ada/zlib.gpr | 20 -
c++/libs/zlib-1.2.8/contrib/amd64/amd64-match.S | 452 -
c++/libs/zlib-1.2.8/contrib/asm686/README.686 | 51 -
c++/libs/zlib-1.2.8/contrib/asm686/match.S | 357 -
c++/libs/zlib-1.2.8/contrib/blast/Makefile | 8 -
c++/libs/zlib-1.2.8/contrib/blast/README | 4 -
c++/libs/zlib-1.2.8/contrib/blast/blast.c | 446 -
c++/libs/zlib-1.2.8/contrib/blast/blast.h | 75 -
c++/libs/zlib-1.2.8/contrib/blast/test.txt | 1 -
c++/libs/zlib-1.2.8/contrib/delphi/ZLib.pas | 557 -
.../zlib-1.2.8/contrib/delphi/ZLibConst.pas | 11 -
c++/libs/zlib-1.2.8/contrib/delphi/readme.txt | 76 -
c++/libs/zlib-1.2.8/contrib/delphi/zlibd32.mak | 99 -
.../zlib-1.2.8/contrib/dotzlib/DotZLib.build | 33 -
c++/libs/zlib-1.2.8/contrib/dotzlib/DotZLib.sln | 21 -
.../contrib/dotzlib/DotZLib/AssemblyInfo.cs | 58 -
.../contrib/dotzlib/DotZLib/ChecksumImpl.cs | 202 -
.../contrib/dotzlib/DotZLib/CircularBuffer.cs | 83 -
.../contrib/dotzlib/DotZLib/CodecBase.cs | 198 -
.../contrib/dotzlib/DotZLib/Deflater.cs | 106 -
.../contrib/dotzlib/DotZLib/DotZLib.cs | 288 -
.../contrib/dotzlib/DotZLib/DotZLib.csproj | 141 -
.../contrib/dotzlib/DotZLib/GZipStream.cs | 301 -
.../contrib/dotzlib/DotZLib/Inflater.cs | 105 -
.../contrib/dotzlib/DotZLib/UnitTests.cs | 274 -
.../zlib-1.2.8/contrib/dotzlib/LICENSE_1_0.txt | 23 -
c++/libs/zlib-1.2.8/contrib/dotzlib/readme.txt | 58 -
.../zlib-1.2.8/contrib/gcc_gvmat64/gvmat64.S | 574 -
c++/libs/zlib-1.2.8/contrib/infback9/README | 1 -
c++/libs/zlib-1.2.8/contrib/infback9/infback9.c | 615 -
c++/libs/zlib-1.2.8/contrib/infback9/infback9.h | 37 -
c++/libs/zlib-1.2.8/contrib/infback9/inffix9.h | 107 -
c++/libs/zlib-1.2.8/contrib/infback9/inflate9.h | 47 -
c++/libs/zlib-1.2.8/contrib/infback9/inftree9.c | 324 -
c++/libs/zlib-1.2.8/contrib/infback9/inftree9.h | 61 -
.../zlib-1.2.8/contrib/inflate86/inffas86.c | 1157 -
c++/libs/zlib-1.2.8/contrib/inflate86/inffast.S | 1368 --
c++/libs/zlib-1.2.8/contrib/iostream/test.cpp | 24 -
.../zlib-1.2.8/contrib/iostream/zfstream.cpp | 329 -
c++/libs/zlib-1.2.8/contrib/iostream/zfstream.h | 128 -
c++/libs/zlib-1.2.8/contrib/iostream2/zstream.h | 307 -
.../contrib/iostream2/zstream_test.cpp | 25 -
c++/libs/zlib-1.2.8/contrib/iostream3/README | 35 -
c++/libs/zlib-1.2.8/contrib/iostream3/TODO | 17 -
c++/libs/zlib-1.2.8/contrib/iostream3/test.cc | 50 -
.../zlib-1.2.8/contrib/iostream3/zfstream.cc | 479 -
.../zlib-1.2.8/contrib/iostream3/zfstream.h | 466 -
.../zlib-1.2.8/contrib/masmx64/bld_ml64.bat | 2 -
c++/libs/zlib-1.2.8/contrib/masmx64/gvmat64.asm | 553 -
.../zlib-1.2.8/contrib/masmx64/inffas8664.c | 186 -
.../zlib-1.2.8/contrib/masmx64/inffasx64.asm | 396 -
c++/libs/zlib-1.2.8/contrib/masmx64/readme.txt | 31 -
.../zlib-1.2.8/contrib/masmx86/bld_ml32.bat | 2 -
.../zlib-1.2.8/contrib/masmx86/inffas32.asm | 1080 -
.../zlib-1.2.8/contrib/masmx86/match686.asm | 479 -
c++/libs/zlib-1.2.8/contrib/masmx86/readme.txt | 27 -
c++/libs/zlib-1.2.8/contrib/minizip/Makefile | 25 -
c++/libs/zlib-1.2.8/contrib/minizip/Makefile.am | 45 -
.../contrib/minizip/MiniZip64_Changes.txt | 6 -
.../contrib/minizip/MiniZip64_info.txt | 74 -
.../zlib-1.2.8/contrib/minizip/configure.ac | 32 -
c++/libs/zlib-1.2.8/contrib/minizip/crypt.h | 131 -
c++/libs/zlib-1.2.8/contrib/minizip/ioapi.c | 247 -
c++/libs/zlib-1.2.8/contrib/minizip/ioapi.h | 208 -
c++/libs/zlib-1.2.8/contrib/minizip/iowin32.c | 461 -
c++/libs/zlib-1.2.8/contrib/minizip/iowin32.h | 28 -
.../zlib-1.2.8/contrib/minizip/make_vms.com | 25 -
c++/libs/zlib-1.2.8/contrib/minizip/miniunz.c | 660 -
c++/libs/zlib-1.2.8/contrib/minizip/miniunzip.1 | 63 -
c++/libs/zlib-1.2.8/contrib/minizip/minizip.1 | 46 -
c++/libs/zlib-1.2.8/contrib/minizip/minizip.c | 520 -
.../zlib-1.2.8/contrib/minizip/minizip.pc.in | 12 -
c++/libs/zlib-1.2.8/contrib/minizip/mztools.c | 291 -
c++/libs/zlib-1.2.8/contrib/minizip/mztools.h | 37 -
c++/libs/zlib-1.2.8/contrib/minizip/unzip.c | 2125 --
c++/libs/zlib-1.2.8/contrib/minizip/unzip.h | 437 -
c++/libs/zlib-1.2.8/contrib/minizip/zip.c | 2007 --
c++/libs/zlib-1.2.8/contrib/minizip/zip.h | 362 -
c++/libs/zlib-1.2.8/contrib/pascal/example.pas | 599 -
c++/libs/zlib-1.2.8/contrib/pascal/readme.txt | 76 -
c++/libs/zlib-1.2.8/contrib/pascal/zlibd32.mak | 99 -
c++/libs/zlib-1.2.8/contrib/pascal/zlibpas.pas | 276 -
c++/libs/zlib-1.2.8/contrib/puff/Makefile | 42 -
c++/libs/zlib-1.2.8/contrib/puff/README | 63 -
c++/libs/zlib-1.2.8/contrib/puff/puff.c | 840 -
c++/libs/zlib-1.2.8/contrib/puff/puff.h | 35 -
c++/libs/zlib-1.2.8/contrib/puff/pufftest.c | 165 -
c++/libs/zlib-1.2.8/contrib/testzlib/testzlib.c | 275 -
.../zlib-1.2.8/contrib/testzlib/testzlib.txt | 10 -
c++/libs/zlib-1.2.8/contrib/untgz/Makefile | 14 -
c++/libs/zlib-1.2.8/contrib/untgz/Makefile.msc | 17 -
c++/libs/zlib-1.2.8/contrib/untgz/untgz.c | 674 -
c++/libs/zlib-1.2.8/contrib/vstudio/readme.txt | 65 -
.../contrib/vstudio/vc10/miniunz.vcxproj | 310 -
.../vstudio/vc10/miniunz.vcxproj.filters | 22 -
.../contrib/vstudio/vc10/minizip.vcxproj | 307 -
.../vstudio/vc10/minizip.vcxproj.filters | 22 -
.../contrib/vstudio/vc10/testzlib.vcxproj | 420 -
.../vstudio/vc10/testzlib.vcxproj.filters | 58 -
.../contrib/vstudio/vc10/testzlibdll.vcxproj | 310 -
.../vstudio/vc10/testzlibdll.vcxproj.filters | 22 -
.../zlib-1.2.8/contrib/vstudio/vc10/zlib.rc | 32 -
.../contrib/vstudio/vc10/zlibstat.vcxproj | 473 -
.../vstudio/vc10/zlibstat.vcxproj.filters | 77 -
.../zlib-1.2.8/contrib/vstudio/vc10/zlibvc.def | 143 -
.../zlib-1.2.8/contrib/vstudio/vc10/zlibvc.sln | 135 -
.../contrib/vstudio/vc10/zlibvc.vcxproj | 657 -
.../contrib/vstudio/vc10/zlibvc.vcxproj.filters | 118 -
.../contrib/vstudio/vc11/miniunz.vcxproj | 314 -
.../contrib/vstudio/vc11/minizip.vcxproj | 311 -
.../contrib/vstudio/vc11/testzlib.vcxproj | 426 -
.../contrib/vstudio/vc11/testzlibdll.vcxproj | 314 -
.../zlib-1.2.8/contrib/vstudio/vc11/zlib.rc | 32 -
.../contrib/vstudio/vc11/zlibstat.vcxproj | 464 -
.../zlib-1.2.8/contrib/vstudio/vc11/zlibvc.def | 143 -
.../zlib-1.2.8/contrib/vstudio/vc11/zlibvc.sln | 117 -
.../contrib/vstudio/vc11/zlibvc.vcxproj | 688 -
.../contrib/vstudio/vc9/miniunz.vcproj | 565 -
.../contrib/vstudio/vc9/minizip.vcproj | 562 -
.../contrib/vstudio/vc9/testzlib.vcproj | 852 -
.../contrib/vstudio/vc9/testzlibdll.vcproj | 565 -
c++/libs/zlib-1.2.8/contrib/vstudio/vc9/zlib.rc | 32 -
.../contrib/vstudio/vc9/zlibstat.vcproj | 835 -
.../zlib-1.2.8/contrib/vstudio/vc9/zlibvc.def | 143 -
.../zlib-1.2.8/contrib/vstudio/vc9/zlibvc.sln | 144 -
.../contrib/vstudio/vc9/zlibvc.vcproj | 1156 -
c++/libs/zlib-1.2.8/crc32.c | 425 -
c++/libs/zlib-1.2.8/crc32.h | 441 -
c++/libs/zlib-1.2.8/deflate.c | 1967 --
c++/libs/zlib-1.2.8/deflate.h | 346 -
c++/libs/zlib-1.2.8/doc/algorithm.txt | 209 -
c++/libs/zlib-1.2.8/doc/rfc1950.txt | 619 -
c++/libs/zlib-1.2.8/doc/rfc1951.txt | 955 -
c++/libs/zlib-1.2.8/doc/rfc1952.txt | 675 -
c++/libs/zlib-1.2.8/doc/txtvsbin.txt | 107 -
c++/libs/zlib-1.2.8/examples/README.examples | 49 -
c++/libs/zlib-1.2.8/examples/enough.c | 572 -
c++/libs/zlib-1.2.8/examples/fitblk.c | 233 -
c++/libs/zlib-1.2.8/examples/gun.c | 702 -
c++/libs/zlib-1.2.8/examples/gzappend.c | 504 -
c++/libs/zlib-1.2.8/examples/gzjoin.c | 449 -
c++/libs/zlib-1.2.8/examples/gzlog.c | 1059 -
c++/libs/zlib-1.2.8/examples/gzlog.h | 91 -
c++/libs/zlib-1.2.8/examples/zlib_how.html | 545 -
c++/libs/zlib-1.2.8/examples/zpipe.c | 205 -
c++/libs/zlib-1.2.8/examples/zran.c | 409 -
c++/libs/zlib-1.2.8/gzclose.c | 25 -
c++/libs/zlib-1.2.8/gzguts.h | 209 -
c++/libs/zlib-1.2.8/gzlib.c | 634 -
c++/libs/zlib-1.2.8/gzread.c | 594 -
c++/libs/zlib-1.2.8/gzwrite.c | 577 -
c++/libs/zlib-1.2.8/include/zconf.h | 513 -
c++/libs/zlib-1.2.8/include/zlib.h | 1768 --
c++/libs/zlib-1.2.8/infback.c | 640 -
c++/libs/zlib-1.2.8/inffast.c | 340 -
c++/libs/zlib-1.2.8/inffast.h | 11 -
c++/libs/zlib-1.2.8/inffixed.h | 94 -
c++/libs/zlib-1.2.8/inflate.c | 1512 --
c++/libs/zlib-1.2.8/inflate.h | 122 -
c++/libs/zlib-1.2.8/inftrees.c | 306 -
c++/libs/zlib-1.2.8/inftrees.h | 62 -
c++/libs/zlib-1.2.8/make_vms.com | 867 -
c++/libs/zlib-1.2.8/msdos/Makefile.bor | 115 -
c++/libs/zlib-1.2.8/msdos/Makefile.dj2 | 104 -
c++/libs/zlib-1.2.8/msdos/Makefile.emx | 69 -
c++/libs/zlib-1.2.8/msdos/Makefile.msc | 112 -
c++/libs/zlib-1.2.8/msdos/Makefile.tc | 100 -
c++/libs/zlib-1.2.8/nintendods/Makefile | 126 -
c++/libs/zlib-1.2.8/nintendods/README | 5 -
c++/libs/zlib-1.2.8/old/Makefile.emx | 69 -
c++/libs/zlib-1.2.8/old/Makefile.riscos | 151 -
c++/libs/zlib-1.2.8/old/README | 3 -
c++/libs/zlib-1.2.8/old/descrip.mms | 48 -
c++/libs/zlib-1.2.8/old/os2/Makefile.os2 | 136 -
c++/libs/zlib-1.2.8/old/os2/zlib.def | 51 -
c++/libs/zlib-1.2.8/old/visual-basic.txt | 160 -
c++/libs/zlib-1.2.8/qnx/package.qpg | 141 -
c++/libs/zlib-1.2.8/test/example.c | 601 -
c++/libs/zlib-1.2.8/test/infcover.c | 671 -
c++/libs/zlib-1.2.8/test/minigzip.c | 651 -
c++/libs/zlib-1.2.8/treebuild.xml | 116 -
c++/libs/zlib-1.2.8/trees.c | 1226 --
c++/libs/zlib-1.2.8/trees.h | 128 -
c++/libs/zlib-1.2.8/uncompr.c | 59 -
c++/libs/zlib-1.2.8/watcom/watcom_f.mak | 43 -
c++/libs/zlib-1.2.8/watcom/watcom_l.mak | 43 -
c++/libs/zlib-1.2.8/win32/DLL_FAQ.txt | 397 -
c++/libs/zlib-1.2.8/win32/Makefile.bor | 110 -
c++/libs/zlib-1.2.8/win32/Makefile.gcc | 182 -
c++/libs/zlib-1.2.8/win32/Makefile.msc | 163 -
c++/libs/zlib-1.2.8/win32/README-WIN32.txt | 103 -
c++/libs/zlib-1.2.8/win32/VisualC.txt | 3 -
c++/libs/zlib-1.2.8/win32/zlib.def | 86 -
c++/libs/zlib-1.2.8/win32/zlib1.rc | 40 -
c++/libs/zlib-1.2.8/zconf.h.cmakein | 513 -
c++/libs/zlib-1.2.8/zconf.h.in | 511 -
c++/libs/zlib-1.2.8/zlib.3 | 151 -
c++/libs/zlib-1.2.8/zlib.h | 1768 --
c++/libs/zlib-1.2.8/zlib.map | 83 -
c++/libs/zlib-1.2.8/zlib.pc.cmakein | 13 -
c++/libs/zlib-1.2.8/zlib.pc.in | 13 -
c++/libs/zlib-1.2.8/zlib2ansi | 152 -
c++/libs/zlib-1.2.8/zutil.c | 324 -
c++/libs/zlib-1.2.8/zutil.h | 253 -
cmake_modules/ThirdpartyToolchain.cmake | 101 +
299 files changed, 108 insertions(+), 167132 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9511f5b..4cb178f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,6 +19,10 @@ SET(CPACK_PACKAGE_VERSION_MAJOR "1")
SET(CPACK_PACKAGE_VERSION_MINOR "5")
SET(CPACK_PACKAGE_VERSION_PATCH "0-SNAPSHOT")
SET(ORC_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake_modules")
+set (LZ4_VERSION "1.7.5")
+set (SNAPPY_VERSION "1.1.4")
+set (ZLIB_VERSION "1.2.11")
option (BUILD_JAVA
"Include ORC Java library in the build process"
@@ -36,6 +40,7 @@ endif ()
SET(CPACK_GENERATOR "TGZ")
INCLUDE(CPack)
+INCLUDE(ExternalProject)
set (GMOCK_VERSION "1.7.0")
set (GMOCK_INCLUDE_DIRS
@@ -47,28 +52,12 @@ if(NOT APPLE AND NOT MSVC)
list (APPEND GMOCK_LIBRARIES pthread)
endif(NOT APPLE AND NOT MSVC)
-set (LZ4_VERSION "r131")
-set (LZ4_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/c++/libs/lz4-${LZ4_VERSION}/lib")
-set (LZ4_LIBRARIES lz4)
-
set (PROTOBUF_VERSION "2.6.0")
set (PROTOBUF_INCLUDE_DIRS
"${CMAKE_SOURCE_DIR}/c++/libs/protobuf-${PROTOBUF_VERSION}/src")
set (PROTOBUF_LIBRARIES protobuf)
set (PROTOBUF_EXECUTABLE "${CMAKE_BINARY_DIR}/c++/libs/protobuf-${PROTOBUF_VERSION}/protoc")
-set (SNAPPY_VERSION "1.1.2")
-set (SNAPPY_INCLUDE_DIRS
- "${CMAKE_SOURCE_DIR}/c++/libs/snappy-${SNAPPY_VERSION}")
-set (SNAPPY_LIBRARIES snappy)
-
-set (ZLIB_VERSION "1.2.8")
-set (ZLIB_INCLUDE_DIRS
- "${CMAKE_SOURCE_DIR}/c++/libs/zlib-${ZLIB_VERSION}"
- "${CMAKE_BINARY_DIR}/c++/libs/zlib-${ZLIB_VERSION}"
- )
-set (ZLIB_LIBRARIES zlib)
-
#
# Compiler specific flags
#
@@ -108,6 +97,8 @@ endif ()
enable_testing()
+INCLUDE(ThirdpartyToolchain)
+
set (EXAMPLE_DIRECTORY ${CMAKE_SOURCE_DIR}/examples)
add_subdirectory(c++)
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/c++/libs/CMakeLists.txt b/c++/libs/CMakeLists.txt
index e298f0d..9657f8b 100644
--- a/c++/libs/CMakeLists.txt
+++ b/c++/libs/CMakeLists.txt
@@ -19,7 +19,4 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
endif ()
add_subdirectory(gmock-${GMOCK_VERSION})
-add_subdirectory(zlib-${ZLIB_VERSION})
add_subdirectory(protobuf-${PROTOBUF_VERSION})
-add_subdirectory(snappy-${SNAPPY_VERSION})
-add_subdirectory(lz4-${LZ4_VERSION})
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/lz4-r131/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/c++/libs/lz4-r131/CMakeLists.txt b/c++/libs/lz4-r131/CMakeLists.txt
deleted file mode 100644
index 832b6c3..0000000
--- a/c++/libs/lz4-r131/CMakeLists.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-cmake_minimum_required(VERSION 2.4.4)
-
-project(lz4 C)
-
-set(VERSION "r131")
-
-add_library (lz4 STATIC
- lib/lz4.c
- )
-
-install(TARGETS lz4 DESTINATION lib)
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/lz4-r131/NEWS
----------------------------------------------------------------------
diff --git a/c++/libs/lz4-r131/NEWS b/c++/libs/lz4-r131/NEWS
deleted file mode 100644
index 781687d..0000000
--- a/c++/libs/lz4-r131/NEWS
+++ /dev/null
@@ -1,178 +0,0 @@
-r131
-New : Dos/DJGPP target, thanks to Louis Santillan (#114)
-Added : Example using lz4frame library, by Zbigniew Jędrzejewski-Szmek (#118)
-Changed: xxhash symbols are modified (namespace emulation) within liblz4
-
-r130:
-Fixed : incompatibility sparse mode vs console, reported by Yongwoon Cho (#105)
-Fixed : LZ4IO exits too early when frame crc not present, reported by Yongwoon Cho (#106)
-Fixed : incompatibility sparse mode vs append mode, reported by Takayuki Matsuoka (#110)
-Performance fix : big compression speed boost for clang (+30%)
-New : cross-version test, by Takayuki Matsuoka
-
-r129:
-Added : LZ4_compress_fast(), LZ4_compress_fast_continue()
-Added : LZ4_compress_destSize()
-Changed: New lz4 and lz4hc compression API. Previous function prototypes still supported.
-Changed: Sparse file support enabled by default
-New : LZ4 CLI improved performance compressing/decompressing multiple files (#86, kind contribution from Kyle J. Harper & Takayuki Matsuoka)
-Fixed : GCC 4.9+ optimization bug - Reported by Markus Trippelsdorf, Greg Slazinski & Evan Nemerson
-Changed: Enums converted to LZ4F_ namespace convention - by Takayuki Matsuoka
-Added : AppVeyor CI environment, for Visual tests - Suggested by Takayuki Matsuoka
-Modified:Obsolete functions generate warnings - Suggested by Evan Nemerson, contributed by Takayuki Matsuoka
-Fixed : Bug #75 (unfinished stream), reported by Yongwoon Cho
-Updated: Documentation converted to MarkDown format
-
-r128:
-New : lz4cli sparse file support (Requested by Neil Wilson, and contributed by Takayuki Matsuoka)
-New : command -m, to compress multiple files in a single command (suggested by Kyle J. Harper)
-Fixed : Restored lz4hc compression ratio (slightly lower since r124)
-New : lz4 cli supports long commands (suggested by Takayuki Matsuoka)
-New : lz4frame & lz4cli frame content size support
-New : lz4frame supports skippable frames, as requested by Sergey Cherepanov
-Changed: Default "make install" directory is /usr/local, as notified by Ron Johnson
-New : lz4 cli supports "pass-through" mode, requested by Neil Wilson
-New : datagen can generate sparse files
-New : scan-build tests, thanks to kind help by Takayuki Matsuoka
-New : g++ compatibility tests
-New : arm cross-compilation test, thanks to kind help by Takayuki Matsuoka
-Fixed : Fuzzer + frametest compatibility with NetBSD (issue #48, reported by Thomas Klausner)
-Added : Visual project directory
-Updated: Man page & Specification
-
-r127:
-N/A : added a file on SVN
-
-r126:
-New : lz4frame API is now integrated into liblz4
-Fixed : GCC 4.9 bug on highest performance settings, reported by Greg Slazinski
-Fixed : bug within LZ4 HC streaming mode, reported by James Boyle
-Fixed : older compiler don't like nameless unions, reported by Cheyi Lin
-Changed : lz4 is C90 compatible
-Changed : added -pedantic option, fixed a few mminor warnings
-
-r125:
-Changed : endian and alignment code
-Changed : directory structure : new "lib" directory
-Updated : lz4io, now uses lz4frame
-Improved: slightly improved decoding speed
-Fixed : LZ4_compress_limitedOutput(); Special thanks to Christopher Speller !
-Fixed : some alignment warnings under clang
-Fixed : deprecated function LZ4_slideInputBufferHC()
-
-r124:
-New : LZ4 HC streaming mode
-Fixed : LZ4F_compressBound() using null preferencesPtr
-Updated : xxHash to r38
-Updated library number, to 1.4.0
-
-r123:
-Added : experimental lz4frame API, thanks to Takayuki Matsuoka and Christopher Jackson for testings
-Fix : s390x support, thanks to Nobuhiro Iwamatsu
-Fix : test mode (-t) no longer requires confirmation, thanks to Thary Nguyen
-
-r122:
-Fix : AIX & AIX64 support (SamG)
-Fix : mips 64-bits support (lew van)
-Added : Examples directory, using code examples from Takayuki Matsuoka
-Updated : Framing specification, to v1.4.1
-Updated : xxHash, to r36
-
-r121:
-Added : Makefile : install for kFreeBSD and Hurd (Nobuhiro Iwamatsu)
-Fix : Makefile : install for OS-X and BSD, thanks to Takayuki Matsuoka
-
-r120:
-Modified : Streaming API, using strong types
-Added : LZ4_versionNumber(), thanks to Takayuki Matsuoka
-Fix : OS-X : library install name, thanks to Clemens Lang
-Updated : Makefile : synchronize library version number with lz4.h, thanks to Takayuki Matsuoka
-Updated : Makefile : stricter compilation flags
-Added : pkg-config, thanks to Zbigniew Jędrzejewski-Szmek (issue 135)
-Makefile : lz4-test only test native binaries, as suggested by Michał Górny (issue 136)
-Updated : xxHash to r35
-
-r119:
-Fix : Issue 134 : extended malicious address space overflow in 32-bits mode for some specific configurations
-
-r118:
-New : LZ4 Streaming API (Fast version), special thanks to Takayuki Matsuoka
-New : datagen : parametrable synthetic data generator for tests
-Improved : fuzzer, support more test cases, more parameters, ability to jump to specific test
-fix : support ppc64le platform (issue 131)
-fix : Issue 52 (malicious address space overflow in 32-bits mode when using large custom format)
-fix : Makefile : minor issue 130 : header files permissions
-
-r117:
-Added : man pages for lz4c and lz4cat
-Added : automated tests on Travis, thanks to Takayuki Matsuoka !
-fix : block-dependency command line (issue 127)
-fix : lz4fullbench (issue 128)
-
-r116:
-hotfix (issue 124 & 125)
-
-r115:
-Added : lz4cat utility, installed on POSX systems (issue 118)
-OS-X compatible compilation of dynamic library (issue 115)
-
-r114:
-Makefile : library correctly compiled with -O3 switch (issue 114)
-Makefile : library compilation compatible with clang
-Makefile : library is versioned and linked (issue 119)
-lz4.h : no more static inline prototypes (issue 116)
-man : improved header/footer (issue 111)
-Makefile : Use system default $(CC) & $(MAKE) variables (issue 112)
-xxhash : updated to r34
-
-r113:
-Large decompression speed improvement for GCC 32-bits. Thanks to Valery Croizier !
-LZ4HC : Compression Level is now a programmable parameter (CLI from 4 to 9)
-Separated IO routines from command line (lz4io.c)
-Version number into lz4.h (suggested by Francesc Alted)
-
-r112:
-quickfix
-
-r111 :
-Makefile : added capability to install libraries
-Modified Directory tree, to better separate libraries from programs.
-
-r110 :
-lz4 & lz4hc : added capability to allocate state & stream state with custom allocator (issue 99)
-fuzzer & fullbench : updated to test new functions
-man : documented -l command (Legacy format, for Linux kernel compression) (issue 102)
-cmake : improved version by Mika Attila, building programs and libraries (issue 100)
-xxHash : updated to r33
-Makefile : clean also delete local package .tar.gz
-
-r109 :
-lz4.c : corrected issue 98 (LZ4_compress_limitedOutput())
-Makefile : can specify version number from makefile
-
-r108 :
-lz4.c : corrected compression efficiency issue 97 in 64-bits chained mode (-BD) for streams > 4 GB (thanks Roman Strashkin for reporting)
-
-r107 :
-Makefile : support DESTDIR for staged installs. Thanks Jorge Aparicio.
-Makefile : make install installs both lz4 and lz4c (Jorge Aparicio)
-Makefile : removed -Wno-implicit-declaration compilation switch
-lz4cli.c : include <stduni.h> for isatty() (Luca Barbato)
-lz4.h : introduced LZ4_MAX_INPUT_SIZE constant (Shay Green)
-lz4.h : LZ4_compressBound() : unified macro and inline definitions (Shay Green)
-lz4.h : LZ4_decompressSafe_partial() : clarify comments (Shay Green)
-lz4.c : LZ4_compress() verify input size condition (Shay Green)
-bench.c : corrected a bug in free memory size evaluation
-cmake : install into bin/ directory (Richard Yao)
-cmake : check for just C compiler (Elan Ruusamae)
-
-r106 :
-Makefile : make dist modify text files in the package to respect Unix EoL convention
-lz4cli.c : corrected small display bug in HC mode
-
-r105 :
-Makefile : New install script and man page, contributed by Prasad Pandit
-lz4cli.c : Minor modifications, for easier extensibility
-COPYING : added license file
-LZ4_Streaming_Format.odt : modified file name to remove white space characters
-Makefile : .exe suffix now properly added only for Windows target
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/lz4-r131/README.md
----------------------------------------------------------------------
diff --git a/c++/libs/lz4-r131/README.md b/c++/libs/lz4-r131/README.md
deleted file mode 100644
index a6ba716..0000000
--- a/c++/libs/lz4-r131/README.md
+++ /dev/null
@@ -1,88 +0,0 @@
-LZ4 - Extremely fast compression
-================================
-
-LZ4 is lossless compression algorithm,
-providing compression speed at 400 MB/s per core,
-scalable with multi-cores CPU.
-It also features an extremely fast decoder,
-with speed in multiple GB/s per core,
-typically reaching RAM speed limits on multi-core systems.
-
-Speed can be tuned dynamically, selecting an "acceleration" factor
-which trades compression ratio for more speed up.
-On the other end, a high compression derivative, LZ4_HC, is also provided,
-trading CPU time for improved compression ratio.
-All versions feature the same excellent decompression speed.
-
-
-|Branch |Status |
-|------------|---------|
-|master | [![Build Status][travisMasterBadge]][travisLink] [![Build status][AppveyorMasterBadge]][AppveyorLink] [![coverity][coverBadge]][coverlink] |
-|dev | [![Build Status][travisDevBadge]][travisLink] [![Build status][AppveyorDevBadge]][AppveyorLink] |
-
-[travisMasterBadge]: https://travis-ci.org/Cyan4973/lz4.svg?branch=master "Continuous Integration test suite"
-[travisDevBadge]: https://travis-ci.org/Cyan4973/lz4.svg?branch=dev "Continuous Integration test suite"
-[travisLink]: https://ci.appveyor.com/project/YannCollet/lz4
-[AppveyorMasterBadge]: https://ci.appveyor.com/api/projects/status/v6kxv9si529477cq/branch/master?svg=true "Visual test suite"
-[AppveyorDevBadge]: https://ci.appveyor.com/api/projects/status/v6kxv9si529477cq/branch/dev?svg=true "Visual test suite"
-[AppveyorLink]: https://ci.appveyor.com/project/YannCollet/lz4
-[coverBadge]: https://scan.coverity.com/projects/4735/badge.svg "Static code analysis of Master branch"
-[coverlink]: https://scan.coverity.com/projects/4735
-
-> **Branch Policy:**
-
-> - The "master" branch is considered stable, at all times.
-> - The "dev" branch is the one where all contributions must be merged
- before being promoted to master.
-> + If you plan to propose a patch, please commit into the "dev" branch,
- or its own feature branch.
- Direct commit to "master" are not permitted.
-
-Benchmarks
--------------------------
-
-The benchmark uses the [Open-Source Benchmark program by m^2 (v0.14.3)]
-compiled with GCC v4.8.2 on Linux Mint 64-bits v17.
-The reference system uses a Core i5-4300U @1.9GHz.
-Benchmark evaluates the compression of reference [Silesia Corpus]
-in single-thread mode.
-
-| Compressor | Ratio | Compression | Decompression |
-| ---------- | ----- | ----------- | ------------- |
-| memcpy | 1.000 | 4200 MB/s | 4200 MB/s |
-|**LZ4 fast 17 (r129)**| 1.607 |**690 MB/s** | **2220 MB/s** |
-|**LZ4 default (r129)**|**2.101**|**385 MB/s** | **1850 MB/s** |
-| LZO 2.06 | 2.108 | 350 MB/s | 510 MB/s |
-| QuickLZ 1.5.1.b6 | 2.238 | 320 MB/s | 380 MB/s |
-| Snappy 1.1.0 | 2.091 | 250 MB/s | 960 MB/s |
-| LZF v3.6 | 2.073 | 175 MB/s | 500 MB/s |
-| zlib 1.2.8 -1 | 2.730 | 59 MB/s | 250 MB/s |
-|**LZ4 HC (r129)** |**2.720**| 22 MB/s | **1830 MB/s** |
-| zlib 1.2.8 -6 | 3.099 | 18 MB/s | 270 MB/s |
-
-
-Documentation
--------------------------
-
-The raw LZ4 block compression format is detailed within [lz4_Block_format].
-
-To compress an arbitrarily long file or data stream, multiple blocks are required.
-Organizing these blocks and providing a common header format to handle their content
-is the purpose of the Frame format, defined into [lz4_Frame_format].
-Interoperable versions of LZ4 must respect this frame format.
-
-
-Other source versions
--------------------------
-
-Beyond the C reference source,
-many contributors have created versions of lz4 in multiple languages
-(Java, C#, Python, Perl, Ruby, etc.).
-A list of known source ports is maintained on the [LZ4 Homepage].
-
-
-[Open-Source Benchmark program by m^2 (v0.14.3)]: http://encode.ru/threads/1371-Filesystem-benchmark?p=34029&viewfull=1#post34029
-[Silesia Corpus]: http://sun.aei.polsl.pl/~sdeor/index.php?page=silesia
-[lz4_Block_format]: lz4_Block_format.md
-[lz4_Frame_format]: lz4_Frame_format.md
-[LZ4 Homepage]: http://www.lz4.org
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/lz4-r131/lib/LICENSE
----------------------------------------------------------------------
diff --git a/c++/libs/lz4-r131/lib/LICENSE b/c++/libs/lz4-r131/lib/LICENSE
deleted file mode 100644
index b566df3..0000000
--- a/c++/libs/lz4-r131/lib/LICENSE
+++ /dev/null
@@ -1,24 +0,0 @@
-LZ4 Library
-Copyright (c) 2011-2014, Yann Collet
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice, this
- list of conditions and the following disclaimer in the documentation and/or
- other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/lz4-r131/lib/Makefile
----------------------------------------------------------------------
diff --git a/c++/libs/lz4-r131/lib/Makefile b/c++/libs/lz4-r131/lib/Makefile
deleted file mode 100644
index 02ddd3b..0000000
--- a/c++/libs/lz4-r131/lib/Makefile
+++ /dev/null
@@ -1,117 +0,0 @@
-# ################################################################
-# LZ4 library - Makefile
-# Copyright (C) Yann Collet 2011-2015
-# All rights reserved.
-#
-# BSD license
-# Redistribution and use in source and binary forms, with or without modification,
-# are permitted provided that the following conditions are met:
-#
-# * Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# * Redistributions in binary form must reproduce the above copyright notice, this
-# list of conditions and the following disclaimer in the documentation and/or
-# other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
-# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# You can contact the author at :
-# - LZ4 source repository : https://github.com/Cyan4973/lz4
-# - LZ4 forum froup : https://groups.google.com/forum/#!forum/lz4c
-# ################################################################
-
-# Version numbers
-VERSION ?= 129
-LIBVER_MAJOR=`sed -n '/define LZ4_VERSION_MAJOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < lz4.h`
-LIBVER_MINOR=`sed -n '/define LZ4_VERSION_MINOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < lz4.h`
-LIBVER_PATCH=`sed -n '/define LZ4_VERSION_RELEASE/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < lz4.h`
-LIBVER=$(LIBVER_MAJOR).$(LIBVER_MINOR).$(LIBVER_PATCH)
-
-DESTDIR?=
-PREFIX ?= /usr/local
-CFLAGS ?= -O3
-CFLAGS += -I. -std=c99 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Wcast-qual -Wstrict-prototypes -pedantic -DXXH_NAMESPACE=LZ4_
-
-LIBDIR?= $(PREFIX)/lib
-INCLUDEDIR=$(PREFIX)/include
-
-
-# OS X linker doesn't support -soname, and use different extension
-# see : https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryDesignGuidelines.html
-ifeq ($(shell uname), Darwin)
- SHARED_EXT = dylib
- SHARED_EXT_MAJOR = $(LIBVER_MAJOR).$(SHARED_EXT)
- SHARED_EXT_VER = $(LIBVER).$(SHARED_EXT)
- SONAME_FLAGS = -install_name $(PREFIX)/lib/liblz4.$(SHARED_EXT_MAJOR) -compatibility_version $(LIBVER_MAJOR) -current_version $(LIBVER)
-else
- SONAME_FLAGS = -Wl,-soname=liblz4.$(SHARED_EXT).$(LIBVER_MAJOR)
- SHARED_EXT = so
- SHARED_EXT_MAJOR = $(SHARED_EXT).$(LIBVER_MAJOR)
- SHARED_EXT_VER = $(SHARED_EXT).$(LIBVER)
-endif
-
-default: liblz4
-
-all: liblz4
-
-liblz4: lz4.c lz4hc.c lz4frame.c xxhash.c
- @echo compiling static library
- @$(CC) $(CPPFLAGS) $(CFLAGS) -c $^
- @$(AR) rcs liblz4.a lz4.o lz4hc.o lz4frame.o xxhash.o
- @echo compiling dynamic library $(LIBVER)
- @$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared $^ -fPIC $(SONAME_FLAGS) -o $@.$(SHARED_EXT_VER)
- @echo creating versioned links
- @ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT_MAJOR)
- @ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT)
-
-clean:
- @rm -f core *.o *.a *.$(SHARED_EXT) *.$(SHARED_EXT).* liblz4.pc
- @echo Cleaning library completed
-
-
-#------------------------------------------------------------------------
-#make install is validated only for Linux, OSX, kFreeBSD and Hurd targets
-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU))
-
-liblz4.pc: liblz4.pc.in Makefile
- @echo creating pkgconfig
- @sed -e 's|@PREFIX@|$(PREFIX)|' \
- -e 's|@LIBDIR@|$(LIBDIR)|' \
- -e 's|@INCLUDEDIR@|$(INCLUDEDIR)|' \
- -e 's|@VERSION@|$(VERSION)|' \
- $< >$@
-
-install: liblz4 liblz4.pc
- @install -d -m 755 $(DESTDIR)$(LIBDIR)/pkgconfig/ $(DESTDIR)$(INCLUDEDIR)/
- @install -m 755 liblz4.$(SHARED_EXT_VER) $(DESTDIR)$(LIBDIR)/liblz4.$(SHARED_EXT_VER)
- @cp -a liblz4.$(SHARED_EXT_MAJOR) $(DESTDIR)$(LIBDIR)
- @cp -a liblz4.$(SHARED_EXT) $(DESTDIR)$(LIBDIR)
- @cp -a liblz4.pc $(DESTDIR)$(LIBDIR)/pkgconfig/
- @install -m 644 liblz4.a $(DESTDIR)$(LIBDIR)/liblz4.a
- @install -m 644 lz4.h $(DESTDIR)$(INCLUDEDIR)/lz4.h
- @install -m 644 lz4hc.h $(DESTDIR)$(INCLUDEDIR)/lz4hc.h
- @install -m 644 lz4frame.h $(DESTDIR)$(INCLUDEDIR)/lz4frame.h
- @echo lz4 static and shared library installed
-
-uninstall:
- @rm -f $(DESTDIR)$(LIBDIR)/liblz4.$(SHARED_EXT)
- @rm -f $(DESTDIR)$(LIBDIR)/liblz4.$(SHARED_EXT_MAJOR)
- @rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/liblz4.pc
- @[ -x $(DESTDIR)$(LIBDIR)/liblz4.$(SHARED_EXT_VER) ] && rm -f $(DESTDIR)$(LIBDIR)/liblz4.$(SHARED_EXT_VER)
- @[ -f $(DESTDIR)$(LIBDIR)/liblz4.a ] && rm -f $(DESTDIR)$(LIBDIR)/liblz4.a
- @[ -f $(DESTDIR)$(INCLUDEDIR)/lz4.h ] && rm -f $(DESTDIR)$(INCLUDEDIR)/lz4.h
- @[ -f $(DESTDIR)$(INCLUDEDIR)/lz4hc.h ] && rm -f $(DESTDIR)$(INCLUDEDIR)/lz4hc.h
- @[ -f $(DESTDIR)$(INCLUDEDIR)/lz4frame.h ] && rm -f $(DESTDIR)$(INCLUDEDIR)/lz4frame.h
- @echo lz4 libraries successfully uninstalled
-
-endif
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/lz4-r131/lib/README.md
----------------------------------------------------------------------
diff --git a/c++/libs/lz4-r131/lib/README.md b/c++/libs/lz4-r131/lib/README.md
deleted file mode 100644
index f6ebf5e..0000000
--- a/c++/libs/lz4-r131/lib/README.md
+++ /dev/null
@@ -1,21 +0,0 @@
-LZ4 - Library Files
-================================
-
-The __lib__ directory contains several files, but you don't necessarily need them all.
-
-To integrate fast LZ4 compression/decompression into your program, you basically just need "**lz4.c**" and "**lz4.h**".
-
-For more compression at the cost of compression speed (while preserving decompression speed), use **lz4hc** on top of regular lz4. `lz4hc` only provides compression functions. It also needs `lz4` to compile properly.
-
-If you want to produce files or data streams compatible with `lz4` command line utility, use **lz4frame**. This library encapsulates lz4-compressed blocks into the [official interoperable frame format]. In order to work properly, lz4frame needs lz4 and lz4hc, and also **xxhash**, which provides error detection algorithm.
-(_Advanced stuff_ : It's possible to hide xxhash symbols into a local namespace. This is what `liblz4` does, to avoid symbol duplication in case a user program would link to several libraries containing xxhash symbols.)
-
-A more complex "lz4frame_static.h" is also provided, although its usage is not recommended. It contains definitions which are not guaranteed to remain stable within future versions. Use for static linking ***only***.
-
-The other files are not source code. There are :
-
- - LICENSE : contains the BSD license text
- - Makefile : script to compile or install lz4 library (static or dynamic)
- - liblz4.pc.in : for pkg-config (make install)
-
-[official interoperable frame format]: ../lz4_Frame_format.md
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/lz4-r131/lib/liblz4.pc.in
----------------------------------------------------------------------
diff --git a/c++/libs/lz4-r131/lib/liblz4.pc.in b/c++/libs/lz4-r131/lib/liblz4.pc.in
deleted file mode 100644
index 0d05152..0000000
--- a/c++/libs/lz4-r131/lib/liblz4.pc.in
+++ /dev/null
@@ -1,14 +0,0 @@
-# LZ4 - Fast LZ compression algorithm
-# Copyright (C) 2011-2014, Yann Collet.
-# BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
-
-prefix=@PREFIX@
-libdir=@LIBDIR@
-includedir=@INCLUDEDIR@
-
-Name: lz4
-Description: fast lossless compression algorithm library
-URL: http://code.google.com/p/lz4/
-Version: @VERSION@
-Libs: -L@LIBDIR@ -llz4
-Cflags: -I@INCLUDEDIR@
[43/51] [partial] orc git commit: ORC-204 Update and use CMake
External Project to build C++ compression libraries.
Posted by om...@apache.org.
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/snappy-1.1.2/config.guess
----------------------------------------------------------------------
diff --git a/c++/libs/snappy-1.1.2/config.guess b/c++/libs/snappy-1.1.2/config.guess
deleted file mode 100644
index d622a44..0000000
--- a/c++/libs/snappy-1.1.2/config.guess
+++ /dev/null
@@ -1,1530 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2011, 2012 Free Software Foundation, Inc.
-
-timestamp='2012-02-10'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner. Please send patches (context
-# diff format) to <co...@gnu.org> and include a ChangeLog
-# entry.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub. If it succeeds, it prints the system name on stdout, and
-# exits with 0. Otherwise, it exits with 1.
-#
-# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <co...@gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
- --version | -v )
- echo "$version" ; exit ;;
- --help | --h* | -h )
- echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help" >&2
- exit 1 ;;
- * )
- break ;;
- esac
-done
-
-if test $# != 0; then
- echo "$me: too many arguments$help" >&2
- exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int x;" > $dummy.c ;
- for c in cc gcc c89 c99 ; do
- if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
- CC_FOR_BUILD="$c"; break ;
- fi ;
- done ;
- if test x"$CC_FOR_BUILD" = x ; then
- CC_FOR_BUILD=no_compiler_found ;
- fi
- ;;
- ,,*) CC_FOR_BUILD=$CC ;;
- ,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
- PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
- *:NetBSD:*:*)
- # NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
- # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
- # switched to ELF, *-*-netbsd* would select the old
- # object file format. This provides both forward
- # compatibility and a consistent mechanism for selecting the
- # object file format.
- #
- # Note: NetBSD doesn't particularly care about the vendor
- # portion of the name. We always set it to "unknown".
- sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
- case "${UNAME_MACHINE_ARCH}" in
- armeb) machine=armeb-unknown ;;
- arm*) machine=arm-unknown ;;
- sh3el) machine=shl-unknown ;;
- sh3eb) machine=sh-unknown ;;
- sh5el) machine=sh5le-unknown ;;
- *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
- esac
- # The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
- case "${UNAME_MACHINE_ARCH}" in
- arm*|i386|m68k|ns32k|sh3*|sparc|vax)
- eval $set_cc_for_build
- if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ELF__
- then
- # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
- # Return netbsd for either. FIX?
- os=netbsd
- else
- os=netbsdelf
- fi
- ;;
- *)
- os=netbsd
- ;;
- esac
- # The OS release
- # Debian GNU/NetBSD machines have a different userland, and
- # thus, need a distinct triplet. However, they do not need
- # kernel version information, so it can be replaced with a
- # suitable tag, in the style of linux-gnu.
- case "${UNAME_VERSION}" in
- Debian*)
- release='-gnu'
- ;;
- *)
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
- ;;
- esac
- # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
- # contains redundant information, the shorter form:
- # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}"
- exit ;;
- *:OpenBSD:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
- exit ;;
- *:ekkoBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
- exit ;;
- *:SolidBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
- exit ;;
- macppc:MirBSD:*:*)
- echo powerpc-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
- *:MirBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
- alpha:OSF1:*:*)
- case $UNAME_RELEASE in
- *4.0)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
- ;;
- *5.*)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
- ;;
- esac
- # According to Compaq, /usr/sbin/psrinfo has been available on
- # OSF/1 and Tru64 systems produced since 1995. I hope that
- # covers most systems running today. This code pipes the CPU
- # types through head -n 1, so we only detect the type of CPU 0.
- ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
- case "$ALPHA_CPU_TYPE" in
- "EV4 (21064)")
- UNAME_MACHINE="alpha" ;;
- "EV4.5 (21064)")
- UNAME_MACHINE="alpha" ;;
- "LCA4 (21066/21068)")
- UNAME_MACHINE="alpha" ;;
- "EV5 (21164)")
- UNAME_MACHINE="alphaev5" ;;
- "EV5.6 (21164A)")
- UNAME_MACHINE="alphaev56" ;;
- "EV5.6 (21164PC)")
- UNAME_MACHINE="alphapca56" ;;
- "EV5.7 (21164PC)")
- UNAME_MACHINE="alphapca57" ;;
- "EV6 (21264)")
- UNAME_MACHINE="alphaev6" ;;
- "EV6.7 (21264A)")
- UNAME_MACHINE="alphaev67" ;;
- "EV6.8CB (21264C)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8AL (21264B)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8CX (21264D)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.9A (21264/EV69A)")
- UNAME_MACHINE="alphaev69" ;;
- "EV7 (21364)")
- UNAME_MACHINE="alphaev7" ;;
- "EV7.9 (21364A)")
- UNAME_MACHINE="alphaev79" ;;
- esac
- # A Pn.n version is a patched version.
- # A Vn.n version is a released version.
- # A Tn.n version is a released field test version.
- # A Xn.n version is an unreleased experimental baselevel.
- # 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
- exitcode=$?
- trap '' 0
- exit $exitcode ;;
- Alpha\ *:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # Should we change UNAME_MACHINE based on the output of uname instead
- # of the specific Alpha model?
- echo alpha-pc-interix
- exit ;;
- 21064:Windows_NT:50:3)
- echo alpha-dec-winnt3.5
- exit ;;
- Amiga*:UNIX_System_V:4.0:*)
- echo m68k-unknown-sysv4
- exit ;;
- *:[Aa]miga[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-amigaos
- exit ;;
- *:[Mm]orph[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-morphos
- exit ;;
- *:OS/390:*:*)
- echo i370-ibm-openedition
- exit ;;
- *:z/VM:*:*)
- echo s390-ibm-zvmoe
- exit ;;
- *:OS400:*:*)
- echo powerpc-ibm-os400
- exit ;;
- arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- echo arm-acorn-riscix${UNAME_RELEASE}
- exit ;;
- arm:riscos:*:*|arm:RISCOS:*:*)
- echo arm-unknown-riscos
- exit ;;
- SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
- echo hppa1.1-hitachi-hiuxmpp
- exit ;;
- Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
- # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
- if test "`(/bin/universe) 2>/dev/null`" = att ; then
- echo pyramid-pyramid-sysv3
- else
- echo pyramid-pyramid-bsd
- fi
- exit ;;
- NILE*:*:*:dcosx)
- echo pyramid-pyramid-svr4
- exit ;;
- DRS?6000:unix:4.0:6*)
- echo sparc-icl-nx6
- exit ;;
- DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
- case `/usr/bin/uname -p` in
- sparc) echo sparc-icl-nx7; exit ;;
- esac ;;
- s390x:SunOS:*:*)
- echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4H:SunOS:5.*:*)
- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
- echo i386-pc-auroraux${UNAME_RELEASE}
- exit ;;
- i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- eval $set_cc_for_build
- SUN_ARCH="i386"
- # If there is a compiler, see if it is configured for 64-bit objects.
- # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
- # This test works for both compilers.
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- SUN_ARCH="x86_64"
- fi
- fi
- echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:6*:*)
- # According to config.sub, this is the proper way to canonicalize
- # SunOS6. Hard to guess exactly what SunOS6 will be like, but
- # it's likely to be more like Solaris than SunOS4.
- echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4*:SunOS:*:*)
- case "`/usr/bin/arch -k`" in
- Series*|S4*)
- UNAME_RELEASE=`uname -v`
- ;;
- esac
- # Japanese Language versions have a version number like `4.1.3-JL'.
- echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
- exit ;;
- sun3*:SunOS:*:*)
- echo m68k-sun-sunos${UNAME_RELEASE}
- exit ;;
- sun*:*:4.2BSD:*)
- UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
- case "`/bin/arch`" in
- sun3)
- echo m68k-sun-sunos${UNAME_RELEASE}
- ;;
- sun4)
- echo sparc-sun-sunos${UNAME_RELEASE}
- ;;
- esac
- exit ;;
- aushp:SunOS:*:*)
- echo sparc-auspex-sunos${UNAME_RELEASE}
- exit ;;
- # The situation for MiNT is a little confusing. The machine name
- # can be virtually everything (everything which is not
- # "atarist" or "atariste" at least should have a processor
- # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
- # to the lowercase version "mint" (or "freemint"). Finally
- # the system name "TOS" denotes a system which is actually not
- # MiNT. But MiNT is downward compatible to TOS, so this should
- # be no problem.
- atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
- exit ;;
- hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
- exit ;;
- *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
- exit ;;
- m68k:machten:*:*)
- echo m68k-apple-machten${UNAME_RELEASE}
- exit ;;
- powerpc:machten:*:*)
- echo powerpc-apple-machten${UNAME_RELEASE}
- exit ;;
- RISC*:Mach:*:*)
- echo mips-dec-mach_bsd4.3
- exit ;;
- RISC*:ULTRIX:*:*)
- echo mips-dec-ultrix${UNAME_RELEASE}
- exit ;;
- VAX*:ULTRIX*:*:*)
- echo vax-dec-ultrix${UNAME_RELEASE}
- exit ;;
- 2020:CLIX:*:* | 2430:CLIX:*:*)
- echo clipper-intergraph-clix${UNAME_RELEASE}
- exit ;;
- mips:*:*:UMIPS | mips:*:*:RISCos)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h> /* for printf() prototype */
- int main (int argc, char *argv[]) {
-#else
- int main (argc, argv) int argc; char *argv[]; {
-#endif
- #if defined (host_mips) && defined (MIPSEB)
- #if defined (SYSTYPE_SYSV)
- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_SVR4)
- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
- #endif
- #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
- #endif
- #endif
- exit (-1);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c &&
- dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
- SYSTEM_NAME=`$dummy $dummyarg` &&
- { echo "$SYSTEM_NAME"; exit; }
- echo mips-mips-riscos${UNAME_RELEASE}
- exit ;;
- Motorola:PowerMAX_OS:*:*)
- echo powerpc-motorola-powermax
- exit ;;
- Motorola:*:4.3:PL8-*)
- echo powerpc-harris-powermax
- exit ;;
- Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
- echo powerpc-harris-powermax
- exit ;;
- Night_Hawk:Power_UNIX:*:*)
- echo powerpc-harris-powerunix
- exit ;;
- m88k:CX/UX:7*:*)
- echo m88k-harris-cxux7
- exit ;;
- m88k:*:4*:R4*)
- echo m88k-motorola-sysv4
- exit ;;
- m88k:*:3*:R3*)
- echo m88k-motorola-sysv3
- exit ;;
- AViiON:dgux:*:*)
- # DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
- then
- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
- [ ${TARGET_BINARY_INTERFACE}x = x ]
- then
- echo m88k-dg-dgux${UNAME_RELEASE}
- else
- echo m88k-dg-dguxbcs${UNAME_RELEASE}
- fi
- else
- echo i586-dg-dgux${UNAME_RELEASE}
- fi
- exit ;;
- M88*:DolphinOS:*:*) # DolphinOS (SVR3)
- echo m88k-dolphin-sysv3
- exit ;;
- M88*:*:R3*:*)
- # Delta 88k system running SVR3
- echo m88k-motorola-sysv3
- exit ;;
- XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
- echo m88k-tektronix-sysv3
- exit ;;
- Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
- echo m68k-tektronix-bsd
- exit ;;
- *:IRIX*:*:*)
- echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
- exit ;;
- ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
- i*86:AIX:*:*)
- echo i386-ibm-aix
- exit ;;
- ia64:AIX:*:*)
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
- exit ;;
- *:AIX:2:3)
- if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <sys/systemcfg.h>
-
- main()
- {
- if (!__power_pc())
- exit(1);
- puts("powerpc-ibm-aix3.2.5");
- exit(0);
- }
-EOF
- if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
- then
- echo "$SYSTEM_NAME"
- else
- echo rs6000-ibm-aix3.2.5
- fi
- elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
- echo rs6000-ibm-aix3.2.4
- else
- echo rs6000-ibm-aix3.2
- fi
- exit ;;
- *:AIX:*:[4567])
- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
- IBM_ARCH=rs6000
- else
- IBM_ARCH=powerpc
- fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
- exit ;;
- *:AIX:*:*)
- echo rs6000-ibm-aix
- exit ;;
- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
- echo romp-ibm-bsd4.4
- exit ;;
- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
- exit ;; # report: romp-ibm BSD 4.3
- *:BOSX:*:*)
- echo rs6000-bull-bosx
- exit ;;
- DPX/2?00:B.O.S.:*:*)
- echo m68k-bull-sysv3
- exit ;;
- 9000/[34]??:4.3bsd:1.*:*)
- echo m68k-hp-bsd
- exit ;;
- hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
- echo m68k-hp-bsd4.4
- exit ;;
- 9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- case "${UNAME_MACHINE}" in
- 9000/31? ) HP_ARCH=m68000 ;;
- 9000/[34]?? ) HP_ARCH=m68k ;;
- 9000/[678][0-9][0-9])
- if [ -x /usr/bin/getconf ]; then
- sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
- 532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
- esac ;;
- esac
- fi
- if [ "${HP_ARCH}" = "" ]; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-
- #define _HPUX_SOURCE
- #include <stdlib.h>
- #include <unistd.h>
-
- int main ()
- {
- #if defined(_SC_KERNEL_BITS)
- long bits = sysconf(_SC_KERNEL_BITS);
- #endif
- long cpu = sysconf (_SC_CPU_VERSION);
-
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
- case CPU_PA_RISC2_0:
- #if defined(_SC_KERNEL_BITS)
- switch (bits)
- {
- case 64: puts ("hppa2.0w"); break;
- case 32: puts ("hppa2.0n"); break;
- default: puts ("hppa2.0"); break;
- } break;
- #else /* !defined(_SC_KERNEL_BITS) */
- puts ("hppa2.0"); break;
- #endif
- default: puts ("hppa1.0"); break;
- }
- exit (0);
- }
-EOF
- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
- test -z "$HP_ARCH" && HP_ARCH=hppa
- fi ;;
- esac
- if [ ${HP_ARCH} = "hppa2.0w" ]
- then
- eval $set_cc_for_build
-
- # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
- # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
- # generating 64-bit code. GNU and HP use different nomenclature:
- #
- # $ CC_FOR_BUILD=cc ./config.guess
- # => hppa2.0w-hp-hpux11.23
- # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
- # => hppa64-hp-hpux11.23
-
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
- grep -q __LP64__
- then
- HP_ARCH="hppa2.0w"
- else
- HP_ARCH="hppa64"
- fi
- fi
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit ;;
- ia64:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- echo ia64-hp-hpux${HPUX_REV}
- exit ;;
- 3050*:HI-UX:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <unistd.h>
- int
- main ()
- {
- long cpu = sysconf (_SC_CPU_VERSION);
- /* The order matters, because CPU_IS_HP_MC68K erroneously returns
- true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
- results, however. */
- if (CPU_IS_PA_RISC (cpu))
- {
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
- case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
- default: puts ("hppa-hitachi-hiuxwe2"); break;
- }
- }
- else if (CPU_IS_HP_MC68K (cpu))
- puts ("m68k-hitachi-hiuxwe2");
- else puts ("unknown-hitachi-hiuxwe2");
- exit (0);
- }
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
- echo unknown-hitachi-hiuxwe2
- exit ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
- echo hppa1.1-hp-bsd
- exit ;;
- 9000/8??:4.3bsd:*:*)
- echo hppa1.0-hp-bsd
- exit ;;
- *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
- echo hppa1.0-hp-mpeix
- exit ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
- echo hppa1.1-hp-osf
- exit ;;
- hp8??:OSF1:*:*)
- echo hppa1.0-hp-osf
- exit ;;
- i*86:OSF1:*:*)
- if [ -x /usr/sbin/sysversion ] ; then
- echo ${UNAME_MACHINE}-unknown-osf1mk
- else
- echo ${UNAME_MACHINE}-unknown-osf1
- fi
- exit ;;
- parisc*:Lites*:*:*)
- echo hppa1.1-hp-lites
- exit ;;
- C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
- echo c1-convex-bsd
- exit ;;
- C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
- echo c34-convex-bsd
- exit ;;
- C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
- echo c38-convex-bsd
- exit ;;
- C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
- echo c4-convex-bsd
- exit ;;
- CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*[A-Z]90:*:*:*)
- echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
- | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
- -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
- -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*T3E:*:*:*)
- echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*SV1:*:*:*)
- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- *:UNICOS/mp:*:*)
- echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- 5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
- exit ;;
- sparc*:BSD/OS:*:*)
- echo sparc-unknown-bsdi${UNAME_RELEASE}
- exit ;;
- *:BSD/OS:*:*)
- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
- exit ;;
- *:FreeBSD:*:*)
- UNAME_PROCESSOR=`/usr/bin/uname -p`
- case ${UNAME_PROCESSOR} in
- amd64)
- echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- *)
- echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- esac
- exit ;;
- i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin
- exit ;;
- *:MINGW*:*)
- echo ${UNAME_MACHINE}-pc-mingw32
- exit ;;
- i*:MSYS*:*)
- echo ${UNAME_MACHINE}-pc-msys
- exit ;;
- i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
- exit ;;
- i*:PW*:*)
- echo ${UNAME_MACHINE}-pc-pw32
- exit ;;
- *:Interix*:*)
- case ${UNAME_MACHINE} in
- x86)
- echo i586-pc-interix${UNAME_RELEASE}
- exit ;;
- authenticamd | genuineintel | EM64T)
- echo x86_64-unknown-interix${UNAME_RELEASE}
- exit ;;
- IA64)
- echo ia64-unknown-interix${UNAME_RELEASE}
- exit ;;
- esac ;;
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
- echo i${UNAME_MACHINE}-pc-mks
- exit ;;
- 8664:Windows_NT:*)
- echo x86_64-pc-mks
- exit ;;
- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
- # UNAME_MACHINE based on the output of uname instead of i386?
- echo i586-pc-interix
- exit ;;
- i*:UWIN*:*)
- echo ${UNAME_MACHINE}-pc-uwin
- exit ;;
- amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
- echo x86_64-unknown-cygwin
- exit ;;
- p*:CYGWIN*:*)
- echo powerpcle-unknown-cygwin
- exit ;;
- prep*:SunOS:5.*:*)
- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- *:GNU:*:*)
- # the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
- exit ;;
- *:GNU/*:*:*)
- # other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
- exit ;;
- i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
- exit ;;
- aarch64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- aarch64_be:Linux:*:*)
- UNAME_MACHINE=aarch64_be
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
- EV56) UNAME_MACHINE=alphaev56 ;;
- PCA56) UNAME_MACHINE=alphapca56 ;;
- PCA57) UNAME_MACHINE=alphapca56 ;;
- EV6) UNAME_MACHINE=alphaev6 ;;
- EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit ;;
- arm*:Linux:*:*)
- eval $set_cc_for_build
- if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_EABI__
- then
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- else
- if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_PCS_VFP
- then
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
- else
- echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
- fi
- fi
- exit ;;
- avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- cris:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-gnu
- exit ;;
- crisv32:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-gnu
- exit ;;
- frv:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- hexagon:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- i*86:Linux:*:*)
- LIBC=gnu
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- exit ;;
- ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- mips:Linux:*:* | mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef ${UNAME_MACHINE}
- #undef ${UNAME_MACHINE}el
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=${UNAME_MACHINE}el
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=${UNAME_MACHINE}
- #else
- CPU=
- #endif
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- or32:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- padre:Linux:*:*)
- echo sparc-unknown-linux-gnu
- exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
- exit ;;
- parisc:Linux:*:* | hppa:Linux:*:*)
- # Look for CPU level
- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
- esac
- exit ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- exit ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
- exit ;;
- s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
- exit ;;
- sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- tile*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
- exit ;;
- x86_64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- i*86:DYNIX/ptx:4*:*)
- # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
- # earlier versions are messed up and put the nodename in both
- # sysname and nodename.
- echo i386-sequent-sysv4
- exit ;;
- i*86:UNIX_SV:4.2MP:2.*)
- # Unixware is an offshoot of SVR4, but it has its own version
- # number series starting with 2...
- # I am not positive that other SVR4 systems won't match this,
- # I just have to hope. -- rms.
- # Use sysv4.2uw... so that sysv4* matches it.
- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
- exit ;;
- i*86:OS/2:*:*)
- # If we were able to find `uname', then EMX Unix compatibility
- # is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
- exit ;;
- i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
- exit ;;
- i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
- exit ;;
- i*86:syllable:*:*)
- echo ${UNAME_MACHINE}-pc-syllable
- exit ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit ;;
- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
- UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
- if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
- else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
- fi
- exit ;;
- i*86:*:5:[678]*)
- # UnixWare 7.x, OpenUNIX and OpenServer 6.
- case `/bin/uname -X | grep "^Machine"` in
- *486*) UNAME_MACHINE=i486 ;;
- *Pentium) UNAME_MACHINE=i586 ;;
- *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
- esac
- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
- exit ;;
- i*86:*:3.2:*)
- if test -f /usr/options/cb.name; then
- UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
- elif /bin/uname -X 2>/dev/null >/dev/null ; then
- UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
- (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
- (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
- && UNAME_MACHINE=i586
- (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
- && UNAME_MACHINE=i686
- (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
- && UNAME_MACHINE=i686
- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
- else
- echo ${UNAME_MACHINE}-pc-sysv32
- fi
- exit ;;
- pc:*:*:*)
- # Left here for compatibility:
- # uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i586.
- # Note: whatever this is, it MUST be the same as what config.sub
- # prints for the "djgpp" host, or else GDB configury will decide that
- # this is a cross-build.
- echo i586-pc-msdosdjgpp
- exit ;;
- Intel:Mach:3*:*)
- echo i386-pc-mach3
- exit ;;
- paragon:*:*:*)
- echo i860-intel-osf1
- exit ;;
- i860:*:4.*:*) # i860-SVR4
- if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
- echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
- else # Add other i860-SVR4 vendors below as they are discovered.
- echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
- fi
- exit ;;
- mini*:CTIX:SYS*5:*)
- # "miniframe"
- echo m68010-convergent-sysv
- exit ;;
- mc68k:UNIX:SYSTEM5:3.51m)
- echo m68k-convergent-sysv
- exit ;;
- M680?0:D-NIX:5.3:*)
- echo m68k-diab-dnix
- exit ;;
- M68*:*:R3V[5678]*:*)
- test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
- 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
- OS_REL=''
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
- 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4; exit; } ;;
- NCR*:*:4.2:* | MPRAS*:*:4.2:*)
- OS_REL='.3'
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
- m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- echo m68k-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- mc68030:UNIX_System_V:4.*:*)
- echo m68k-atari-sysv4
- exit ;;
- TSUNAMI:LynxOS:2.*:*)
- echo sparc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- rs6000:LynxOS:2.*:*)
- echo rs6000-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
- echo powerpc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- SM[BE]S:UNIX_SV:*:*)
- echo mips-dde-sysv${UNAME_RELEASE}
- exit ;;
- RM*:ReliantUNIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
- RM*:SINIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
- *:SINIX-*:*:*)
- if uname -p 2>/dev/null >/dev/null ; then
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- echo ${UNAME_MACHINE}-sni-sysv4
- else
- echo ns32k-sni-sysv
- fi
- exit ;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- # says <Ri...@ccMail.Census.GOV>
- echo i586-unisys-sysv4
- exit ;;
- *:UNIX_System_V:4*:FTX*)
- # From Gerald Hewes <he...@openmarket.com>.
- # How about differentiating between stratus architectures? -djm
- echo hppa1.1-stratus-sysv4
- exit ;;
- *:*:*:FTX*)
- # From seanf@swdc.stratus.com.
- echo i860-stratus-sysv4
- exit ;;
- i*86:VOS:*:*)
- # From Paul.Green@stratus.com.
- echo ${UNAME_MACHINE}-stratus-vos
- exit ;;
- *:VOS:*:*)
- # From Paul.Green@stratus.com.
- echo hppa1.1-stratus-vos
- exit ;;
- mc68*:A/UX:*:*)
- echo m68k-apple-aux${UNAME_RELEASE}
- exit ;;
- news*:NEWS-OS:6*:*)
- echo mips-sony-newsos6
- exit ;;
- R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
- if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
- else
- echo mips-unknown-sysv${UNAME_RELEASE}
- fi
- exit ;;
- BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
- echo powerpc-be-beos
- exit ;;
- BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
- echo powerpc-apple-beos
- exit ;;
- BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
- echo i586-pc-beos
- exit ;;
- BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
- echo i586-pc-haiku
- exit ;;
- SX-4:SUPER-UX:*:*)
- echo sx4-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-5:SUPER-UX:*:*)
- echo sx5-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-6:SUPER-UX:*:*)
- echo sx6-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-7:SUPER-UX:*:*)
- echo sx7-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-8:SUPER-UX:*:*)
- echo sx8-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-8R:SUPER-UX:*:*)
- echo sx8r-nec-superux${UNAME_RELEASE}
- exit ;;
- Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody${UNAME_RELEASE}
- exit ;;
- *:Rhapsody:*:*)
- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
- exit ;;
- *:Darwin:*:*)
- UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- case $UNAME_PROCESSOR in
- i386)
- eval $set_cc_for_build
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- UNAME_PROCESSOR="x86_64"
- fi
- fi ;;
- unknown) UNAME_PROCESSOR=powerpc ;;
- esac
- echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
- exit ;;
- *:procnto*:*:* | *:QNX:[0123456789]*:*)
- UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = "x86"; then
- UNAME_PROCESSOR=i386
- UNAME_MACHINE=pc
- fi
- echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
- exit ;;
- *:QNX:*:4*)
- echo i386-pc-qnx
- exit ;;
- NEO-?:NONSTOP_KERNEL:*:*)
- echo neo-tandem-nsk${UNAME_RELEASE}
- exit ;;
- NSE-?:NONSTOP_KERNEL:*:*)
- echo nse-tandem-nsk${UNAME_RELEASE}
- exit ;;
- NSR-?:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk${UNAME_RELEASE}
- exit ;;
- *:NonStop-UX:*:*)
- echo mips-compaq-nonstopux
- exit ;;
- BS2000:POSIX*:*:*)
- echo bs2000-siemens-sysv
- exit ;;
- DS/*:UNIX_System_V:*:*)
- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
- exit ;;
- *:Plan9:*:*)
- # "uname -m" is not consistent, so use $cputype instead. 386
- # is converted to i386 for consistency with other x86
- # operating systems.
- if test "$cputype" = "386"; then
- UNAME_MACHINE=i386
- else
- UNAME_MACHINE="$cputype"
- fi
- echo ${UNAME_MACHINE}-unknown-plan9
- exit ;;
- *:TOPS-10:*:*)
- echo pdp10-unknown-tops10
- exit ;;
- *:TENEX:*:*)
- echo pdp10-unknown-tenex
- exit ;;
- KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
- echo pdp10-dec-tops20
- exit ;;
- XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
- echo pdp10-xkl-tops20
- exit ;;
- *:TOPS-20:*:*)
- echo pdp10-unknown-tops20
- exit ;;
- *:ITS:*:*)
- echo pdp10-unknown-its
- exit ;;
- SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
- exit ;;
- *:DragonFly:*:*)
- echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- exit ;;
- *:*VMS:*:*)
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- case "${UNAME_MACHINE}" in
- A*) echo alpha-dec-vms ; exit ;;
- I*) echo ia64-dec-vms ; exit ;;
- V*) echo vax-dec-vms ; exit ;;
- esac ;;
- *:XENIX:*:SysV)
- echo i386-pc-xenix
- exit ;;
- i*86:skyos:*:*)
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
- exit ;;
- i*86:rdos:*:*)
- echo ${UNAME_MACHINE}-pc-rdos
- exit ;;
- i*86:AROS:*:*)
- echo ${UNAME_MACHINE}-pc-aros
- exit ;;
- x86_64:VMkernel:*:*)
- echo ${UNAME_MACHINE}-unknown-esx
- exit ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
- I don't know.... */
- printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
- printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
- "4"
-#else
- ""
-#endif
- ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
- printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
- int version;
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- if (version < 4)
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
- else
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
- exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
- printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
- printf ("ns32k-encore-mach\n"); exit (0);
-#else
- printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
- printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
- printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
- printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
- struct utsname un;
-
- uname(&un);
-
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
- printf ("i386-sequent-ptx1\n"); exit (0);
- }
- printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-# include <sys/param.h>
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
- printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
- exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
- case `getsysinfo -f cpu_type` in
- c1*)
- echo c1-convex-bsd
- exit ;;
- c2*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- c34*)
- echo c34-convex-bsd
- exit ;;
- c38*)
- echo c38-convex-bsd
- exit ;;
- c4*)
- echo c4-convex-bsd
- exit ;;
- esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-and
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <co...@gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo = `(hostinfo) 2>/dev/null`
-/bin/universe = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/snappy-1.1.2/config.h
----------------------------------------------------------------------
diff --git a/c++/libs/snappy-1.1.2/config.h b/c++/libs/snappy-1.1.2/config.h
deleted file mode 100644
index e6b1877..0000000
--- a/c++/libs/snappy-1.1.2/config.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/* config.h. Generated from config.h.in by configure. */
-/* config.h.in. Generated from configure.ac by autoheader. */
-
-/* Define to 1 if the compiler supports __builtin_ctz and friends. */
-#define HAVE_BUILTIN_CTZ 1
-
-/* Define to 1 if the compiler supports __builtin_expect. */
-#define HAVE_BUILTIN_EXPECT 1
-
-/* Define to 1 if you have the <byteswap.h> header file. */
-/* #undef HAVE_BYTESWAP_H */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* Use the gflags package for command-line parsing. */
-/* #undef HAVE_GFLAGS */
-
-/* Defined when Google Test is available. */
-/* #undef HAVE_GTEST */
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the `fastlz' library (-lfastlz). */
-/* #undef HAVE_LIBFASTLZ */
-
-/* Define to 1 if you have the `lzf' library (-llzf). */
-/* #undef HAVE_LIBLZF */
-
-/* Define to 1 if you have the `lzo2' library (-llzo2). */
-/* #undef HAVE_LIBLZO2 */
-
-/* Define to 1 if you have the `quicklz' library (-lquicklz). */
-/* #undef HAVE_LIBQUICKLZ */
-
-/* Define to 1 if you have the `z' library (-lz). */
-#define HAVE_LIBZ 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if you have the <stddef.h> header file. */
-#define HAVE_STDDEF_H 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the <sys/byteswap.h> header file. */
-/* #undef HAVE_SYS_BYTESWAP_H */
-
-/* Define to 1 if you have the <sys/endian.h> header file. */
-/* #undef HAVE_SYS_ENDIAN_H */
-
-/* Define to 1 if you have the <sys/mman.h> header file. */
-#define HAVE_SYS_MMAN_H 1
-
-/* Define to 1 if you have the <sys/resource.h> header file. */
-#define HAVE_SYS_RESOURCE_H 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/time.h> header file. */
-#define HAVE_SYS_TIME_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define to 1 if you have the <windows.h> header file. */
-/* #undef HAVE_WINDOWS_H */
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#define LT_OBJDIR ".libs/"
-
-/* Name of package */
-#define PACKAGE "snappy"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT ""
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME "snappy"
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "snappy 1.1.2"
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME "snappy"
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.1.2"
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Version number of package */
-#define VERSION "1.1.2"
-
-/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
- significant byte first (like Motorola and SPARC, unlike Intel and VAX). */
-#if defined __BIG_ENDIAN__
-# define WORDS_BIGENDIAN 1
-#elif ! defined __LITTLE_ENDIAN__
-/* # undef WORDS_BIGENDIAN */
-#endif
-
-/* Define to `unsigned int' if <sys/types.h> does not define. */
-/* #undef size_t */
-
-/* Define to `int' if <sys/types.h> does not define. */
-/* #undef ssize_t */
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/snappy-1.1.2/config.h.in
----------------------------------------------------------------------
diff --git a/c++/libs/snappy-1.1.2/config.h.in b/c++/libs/snappy-1.1.2/config.h.in
deleted file mode 100644
index 09b86df..0000000
--- a/c++/libs/snappy-1.1.2/config.h.in
+++ /dev/null
@@ -1,124 +0,0 @@
-/* config.h.in. Generated from configure.ac by autoheader. */
-
-/* Define to 1 if the compiler supports __builtin_ctz and friends. */
-#undef HAVE_BUILTIN_CTZ
-
-/* Define to 1 if the compiler supports __builtin_expect. */
-#undef HAVE_BUILTIN_EXPECT
-
-/* Define to 1 if you have the <byteswap.h> header file. */
-#undef HAVE_BYTESWAP_H
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Use the gflags package for command-line parsing. */
-#undef HAVE_GFLAGS
-
-/* Defined when Google Test is available. */
-#undef HAVE_GTEST
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the `fastlz' library (-lfastlz). */
-#undef HAVE_LIBFASTLZ
-
-/* Define to 1 if you have the `lzf' library (-llzf). */
-#undef HAVE_LIBLZF
-
-/* Define to 1 if you have the `lzo2' library (-llzo2). */
-#undef HAVE_LIBLZO2
-
-/* Define to 1 if you have the `quicklz' library (-lquicklz). */
-#undef HAVE_LIBQUICKLZ
-
-/* Define to 1 if you have the `z' library (-lz). */
-#undef HAVE_LIBZ
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the <stddef.h> header file. */
-#undef HAVE_STDDEF_H
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the <sys/byteswap.h> header file. */
-#undef HAVE_SYS_BYTESWAP_H
-
-/* Define to 1 if you have the <sys/endian.h> header file. */
-#undef HAVE_SYS_ENDIAN_H
-
-/* Define to 1 if you have the <sys/mman.h> header file. */
-#undef HAVE_SYS_MMAN_H
-
-/* Define to 1 if you have the <sys/resource.h> header file. */
-#undef HAVE_SYS_RESOURCE_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/time.h> header file. */
-#undef HAVE_SYS_TIME_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 if you have the <windows.h> header file. */
-#undef HAVE_WINDOWS_H
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#undef LT_OBJDIR
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Version number of package */
-#undef VERSION
-
-/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
- significant byte first (like Motorola and SPARC, unlike Intel and VAX). */
-#if defined __BIG_ENDIAN__
-# define WORDS_BIGENDIAN 1
-#elif ! defined __LITTLE_ENDIAN__
-# undef WORDS_BIGENDIAN
-#endif
-
-/* Define to `unsigned int' if <sys/types.h> does not define. */
-#undef size_t
-
-/* Define to `int' if <sys/types.h> does not define. */
-#undef ssize_t
[19/51] [partial] orc git commit: ORC-204 Update and use CMake
External Project to build C++ compression libraries.
Posted by om...@apache.org.
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/iostream/zfstream.cpp
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/iostream/zfstream.cpp b/c++/libs/zlib-1.2.8/contrib/iostream/zfstream.cpp
deleted file mode 100644
index d0cd85f..0000000
--- a/c++/libs/zlib-1.2.8/contrib/iostream/zfstream.cpp
+++ /dev/null
@@ -1,329 +0,0 @@
-
-#include "zfstream.h"
-
-gzfilebuf::gzfilebuf() :
- file(NULL),
- mode(0),
- own_file_descriptor(0)
-{ }
-
-gzfilebuf::~gzfilebuf() {
-
- sync();
- if ( own_file_descriptor )
- close();
-
-}
-
-gzfilebuf *gzfilebuf::open( const char *name,
- int io_mode ) {
-
- if ( is_open() )
- return NULL;
-
- char char_mode[10];
- char *p = char_mode;
-
- if ( io_mode & ios::in ) {
- mode = ios::in;
- *p++ = 'r';
- } else if ( io_mode & ios::app ) {
- mode = ios::app;
- *p++ = 'a';
- } else {
- mode = ios::out;
- *p++ = 'w';
- }
-
- if ( io_mode & ios::binary ) {
- mode |= ios::binary;
- *p++ = 'b';
- }
-
- // Hard code the compression level
- if ( io_mode & (ios::out|ios::app )) {
- *p++ = '9';
- }
-
- // Put the end-of-string indicator
- *p = '\0';
-
- if ( (file = gzopen(name, char_mode)) == NULL )
- return NULL;
-
- own_file_descriptor = 1;
-
- return this;
-
-}
-
-gzfilebuf *gzfilebuf::attach( int file_descriptor,
- int io_mode ) {
-
- if ( is_open() )
- return NULL;
-
- char char_mode[10];
- char *p = char_mode;
-
- if ( io_mode & ios::in ) {
- mode = ios::in;
- *p++ = 'r';
- } else if ( io_mode & ios::app ) {
- mode = ios::app;
- *p++ = 'a';
- } else {
- mode = ios::out;
- *p++ = 'w';
- }
-
- if ( io_mode & ios::binary ) {
- mode |= ios::binary;
- *p++ = 'b';
- }
-
- // Hard code the compression level
- if ( io_mode & (ios::out|ios::app )) {
- *p++ = '9';
- }
-
- // Put the end-of-string indicator
- *p = '\0';
-
- if ( (file = gzdopen(file_descriptor, char_mode)) == NULL )
- return NULL;
-
- own_file_descriptor = 0;
-
- return this;
-
-}
-
-gzfilebuf *gzfilebuf::close() {
-
- if ( is_open() ) {
-
- sync();
- gzclose( file );
- file = NULL;
-
- }
-
- return this;
-
-}
-
-int gzfilebuf::setcompressionlevel( int comp_level ) {
-
- return gzsetparams(file, comp_level, -2);
-
-}
-
-int gzfilebuf::setcompressionstrategy( int comp_strategy ) {
-
- return gzsetparams(file, -2, comp_strategy);
-
-}
-
-
-streampos gzfilebuf::seekoff( streamoff off, ios::seek_dir dir, int which ) {
-
- return streampos(EOF);
-
-}
-
-int gzfilebuf::underflow() {
-
- // If the file hasn't been opened for reading, error.
- if ( !is_open() || !(mode & ios::in) )
- return EOF;
-
- // if a buffer doesn't exists, allocate one.
- if ( !base() ) {
-
- if ( (allocate()) == EOF )
- return EOF;
- setp(0,0);
-
- } else {
-
- if ( in_avail() )
- return (unsigned char) *gptr();
-
- if ( out_waiting() ) {
- if ( flushbuf() == EOF )
- return EOF;
- }
-
- }
-
- // Attempt to fill the buffer.
-
- int result = fillbuf();
- if ( result == EOF ) {
- // disable get area
- setg(0,0,0);
- return EOF;
- }
-
- return (unsigned char) *gptr();
-
-}
-
-int gzfilebuf::overflow( int c ) {
-
- if ( !is_open() || !(mode & ios::out) )
- return EOF;
-
- if ( !base() ) {
- if ( allocate() == EOF )
- return EOF;
- setg(0,0,0);
- } else {
- if (in_avail()) {
- return EOF;
- }
- if (out_waiting()) {
- if (flushbuf() == EOF)
- return EOF;
- }
- }
-
- int bl = blen();
- setp( base(), base() + bl);
-
- if ( c != EOF ) {
-
- *pptr() = c;
- pbump(1);
-
- }
-
- return 0;
-
-}
-
-int gzfilebuf::sync() {
-
- if ( !is_open() )
- return EOF;
-
- if ( out_waiting() )
- return flushbuf();
-
- return 0;
-
-}
-
-int gzfilebuf::flushbuf() {
-
- int n;
- char *q;
-
- q = pbase();
- n = pptr() - q;
-
- if ( gzwrite( file, q, n) < n )
- return EOF;
-
- setp(0,0);
-
- return 0;
-
-}
-
-int gzfilebuf::fillbuf() {
-
- int required;
- char *p;
-
- p = base();
-
- required = blen();
-
- int t = gzread( file, p, required );
-
- if ( t <= 0) return EOF;
-
- setg( base(), base(), base()+t);
-
- return t;
-
-}
-
-gzfilestream_common::gzfilestream_common() :
- ios( gzfilestream_common::rdbuf() )
-{ }
-
-gzfilestream_common::~gzfilestream_common()
-{ }
-
-void gzfilestream_common::attach( int fd, int io_mode ) {
-
- if ( !buffer.attach( fd, io_mode) )
- clear( ios::failbit | ios::badbit );
- else
- clear();
-
-}
-
-void gzfilestream_common::open( const char *name, int io_mode ) {
-
- if ( !buffer.open( name, io_mode ) )
- clear( ios::failbit | ios::badbit );
- else
- clear();
-
-}
-
-void gzfilestream_common::close() {
-
- if ( !buffer.close() )
- clear( ios::failbit | ios::badbit );
-
-}
-
-gzfilebuf *gzfilestream_common::rdbuf()
-{
- return &buffer;
-}
-
-gzifstream::gzifstream() :
- ios( gzfilestream_common::rdbuf() )
-{
- clear( ios::badbit );
-}
-
-gzifstream::gzifstream( const char *name, int io_mode ) :
- ios( gzfilestream_common::rdbuf() )
-{
- gzfilestream_common::open( name, io_mode );
-}
-
-gzifstream::gzifstream( int fd, int io_mode ) :
- ios( gzfilestream_common::rdbuf() )
-{
- gzfilestream_common::attach( fd, io_mode );
-}
-
-gzifstream::~gzifstream() { }
-
-gzofstream::gzofstream() :
- ios( gzfilestream_common::rdbuf() )
-{
- clear( ios::badbit );
-}
-
-gzofstream::gzofstream( const char *name, int io_mode ) :
- ios( gzfilestream_common::rdbuf() )
-{
- gzfilestream_common::open( name, io_mode );
-}
-
-gzofstream::gzofstream( int fd, int io_mode ) :
- ios( gzfilestream_common::rdbuf() )
-{
- gzfilestream_common::attach( fd, io_mode );
-}
-
-gzofstream::~gzofstream() { }
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/iostream/zfstream.h
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/iostream/zfstream.h b/c++/libs/zlib-1.2.8/contrib/iostream/zfstream.h
deleted file mode 100644
index ed79098..0000000
--- a/c++/libs/zlib-1.2.8/contrib/iostream/zfstream.h
+++ /dev/null
@@ -1,128 +0,0 @@
-
-#ifndef zfstream_h
-#define zfstream_h
-
-#include <fstream.h>
-#include "zlib.h"
-
-class gzfilebuf : public streambuf {
-
-public:
-
- gzfilebuf( );
- virtual ~gzfilebuf();
-
- gzfilebuf *open( const char *name, int io_mode );
- gzfilebuf *attach( int file_descriptor, int io_mode );
- gzfilebuf *close();
-
- int setcompressionlevel( int comp_level );
- int setcompressionstrategy( int comp_strategy );
-
- inline int is_open() const { return (file !=NULL); }
-
- virtual streampos seekoff( streamoff, ios::seek_dir, int );
-
- virtual int sync();
-
-protected:
-
- virtual int underflow();
- virtual int overflow( int = EOF );
-
-private:
-
- gzFile file;
- short mode;
- short own_file_descriptor;
-
- int flushbuf();
- int fillbuf();
-
-};
-
-class gzfilestream_common : virtual public ios {
-
- friend class gzifstream;
- friend class gzofstream;
- friend gzofstream &setcompressionlevel( gzofstream &, int );
- friend gzofstream &setcompressionstrategy( gzofstream &, int );
-
-public:
- virtual ~gzfilestream_common();
-
- void attach( int fd, int io_mode );
- void open( const char *name, int io_mode );
- void close();
-
-protected:
- gzfilestream_common();
-
-private:
- gzfilebuf *rdbuf();
-
- gzfilebuf buffer;
-
-};
-
-class gzifstream : public gzfilestream_common, public istream {
-
-public:
-
- gzifstream();
- gzifstream( const char *name, int io_mode = ios::in );
- gzifstream( int fd, int io_mode = ios::in );
-
- virtual ~gzifstream();
-
-};
-
-class gzofstream : public gzfilestream_common, public ostream {
-
-public:
-
- gzofstream();
- gzofstream( const char *name, int io_mode = ios::out );
- gzofstream( int fd, int io_mode = ios::out );
-
- virtual ~gzofstream();
-
-};
-
-template<class T> class gzomanip {
- friend gzofstream &operator<<(gzofstream &, const gzomanip<T> &);
-public:
- gzomanip(gzofstream &(*f)(gzofstream &, T), T v) : func(f), val(v) { }
-private:
- gzofstream &(*func)(gzofstream &, T);
- T val;
-};
-
-template<class T> gzofstream &operator<<(gzofstream &s, const gzomanip<T> &m)
-{
- return (*m.func)(s, m.val);
-}
-
-inline gzofstream &setcompressionlevel( gzofstream &s, int l )
-{
- (s.rdbuf())->setcompressionlevel(l);
- return s;
-}
-
-inline gzofstream &setcompressionstrategy( gzofstream &s, int l )
-{
- (s.rdbuf())->setcompressionstrategy(l);
- return s;
-}
-
-inline gzomanip<int> setcompressionlevel(int l)
-{
- return gzomanip<int>(&setcompressionlevel,l);
-}
-
-inline gzomanip<int> setcompressionstrategy(int l)
-{
- return gzomanip<int>(&setcompressionstrategy,l);
-}
-
-#endif
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/iostream2/zstream.h
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/iostream2/zstream.h b/c++/libs/zlib-1.2.8/contrib/iostream2/zstream.h
deleted file mode 100644
index 43d2332..0000000
--- a/c++/libs/zlib-1.2.8/contrib/iostream2/zstream.h
+++ /dev/null
@@ -1,307 +0,0 @@
-/*
- *
- * Copyright (c) 1997
- * Christian Michelsen Research AS
- * Advanced Computing
- * Fantoftvegen 38, 5036 BERGEN, Norway
- * http://www.cmr.no
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Christian Michelsen Research AS makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- */
-
-#ifndef ZSTREAM__H
-#define ZSTREAM__H
-
-/*
- * zstream.h - C++ interface to the 'zlib' general purpose compression library
- * $Id: zstream.h 1.1 1997-06-25 12:00:56+02 tyge Exp tyge $
- */
-
-#include <strstream.h>
-#include <string.h>
-#include <stdio.h>
-#include "zlib.h"
-
-#if defined(_WIN32)
-# include <fcntl.h>
-# include <io.h>
-# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
-#else
-# define SET_BINARY_MODE(file)
-#endif
-
-class zstringlen {
-public:
- zstringlen(class izstream&);
- zstringlen(class ozstream&, const char*);
- size_t value() const { return val.word; }
-private:
- struct Val { unsigned char byte; size_t word; } val;
-};
-
-// ----------------------------- izstream -----------------------------
-
-class izstream
-{
- public:
- izstream() : m_fp(0) {}
- izstream(FILE* fp) : m_fp(0) { open(fp); }
- izstream(const char* name) : m_fp(0) { open(name); }
- ~izstream() { close(); }
-
- /* Opens a gzip (.gz) file for reading.
- * open() can be used to read a file which is not in gzip format;
- * in this case read() will directly read from the file without
- * decompression. errno can be checked to distinguish two error
- * cases (if errno is zero, the zlib error is Z_MEM_ERROR).
- */
- void open(const char* name) {
- if (m_fp) close();
- m_fp = ::gzopen(name, "rb");
- }
-
- void open(FILE* fp) {
- SET_BINARY_MODE(fp);
- if (m_fp) close();
- m_fp = ::gzdopen(fileno(fp), "rb");
- }
-
- /* Flushes all pending input if necessary, closes the compressed file
- * and deallocates all the (de)compression state. The return value is
- * the zlib error number (see function error() below).
- */
- int close() {
- int r = ::gzclose(m_fp);
- m_fp = 0; return r;
- }
-
- /* Binary read the given number of bytes from the compressed file.
- */
- int read(void* buf, size_t len) {
- return ::gzread(m_fp, buf, len);
- }
-
- /* Returns the error message for the last error which occurred on the
- * given compressed file. errnum is set to zlib error number. If an
- * error occurred in the file system and not in the compression library,
- * errnum is set to Z_ERRNO and the application may consult errno
- * to get the exact error code.
- */
- const char* error(int* errnum) {
- return ::gzerror(m_fp, errnum);
- }
-
- gzFile fp() { return m_fp; }
-
- private:
- gzFile m_fp;
-};
-
-/*
- * Binary read the given (array of) object(s) from the compressed file.
- * If the input file was not in gzip format, read() copies the objects number
- * of bytes into the buffer.
- * returns the number of uncompressed bytes actually read
- * (0 for end of file, -1 for error).
- */
-template <class T, class Items>
-inline int read(izstream& zs, T* x, Items items) {
- return ::gzread(zs.fp(), x, items*sizeof(T));
-}
-
-/*
- * Binary input with the '>' operator.
- */
-template <class T>
-inline izstream& operator>(izstream& zs, T& x) {
- ::gzread(zs.fp(), &x, sizeof(T));
- return zs;
-}
-
-
-inline zstringlen::zstringlen(izstream& zs) {
- zs > val.byte;
- if (val.byte == 255) zs > val.word;
- else val.word = val.byte;
-}
-
-/*
- * Read length of string + the string with the '>' operator.
- */
-inline izstream& operator>(izstream& zs, char* x) {
- zstringlen len(zs);
- ::gzread(zs.fp(), x, len.value());
- x[len.value()] = '\0';
- return zs;
-}
-
-inline char* read_string(izstream& zs) {
- zstringlen len(zs);
- char* x = new char[len.value()+1];
- ::gzread(zs.fp(), x, len.value());
- x[len.value()] = '\0';
- return x;
-}
-
-// ----------------------------- ozstream -----------------------------
-
-class ozstream
-{
- public:
- ozstream() : m_fp(0), m_os(0) {
- }
- ozstream(FILE* fp, int level = Z_DEFAULT_COMPRESSION)
- : m_fp(0), m_os(0) {
- open(fp, level);
- }
- ozstream(const char* name, int level = Z_DEFAULT_COMPRESSION)
- : m_fp(0), m_os(0) {
- open(name, level);
- }
- ~ozstream() {
- close();
- }
-
- /* Opens a gzip (.gz) file for writing.
- * The compression level parameter should be in 0..9
- * errno can be checked to distinguish two error cases
- * (if errno is zero, the zlib error is Z_MEM_ERROR).
- */
- void open(const char* name, int level = Z_DEFAULT_COMPRESSION) {
- char mode[4] = "wb\0";
- if (level != Z_DEFAULT_COMPRESSION) mode[2] = '0'+level;
- if (m_fp) close();
- m_fp = ::gzopen(name, mode);
- }
-
- /* open from a FILE pointer.
- */
- void open(FILE* fp, int level = Z_DEFAULT_COMPRESSION) {
- SET_BINARY_MODE(fp);
- char mode[4] = "wb\0";
- if (level != Z_DEFAULT_COMPRESSION) mode[2] = '0'+level;
- if (m_fp) close();
- m_fp = ::gzdopen(fileno(fp), mode);
- }
-
- /* Flushes all pending output if necessary, closes the compressed file
- * and deallocates all the (de)compression state. The return value is
- * the zlib error number (see function error() below).
- */
- int close() {
- if (m_os) {
- ::gzwrite(m_fp, m_os->str(), m_os->pcount());
- delete[] m_os->str(); delete m_os; m_os = 0;
- }
- int r = ::gzclose(m_fp); m_fp = 0; return r;
- }
-
- /* Binary write the given number of bytes into the compressed file.
- */
- int write(const void* buf, size_t len) {
- return ::gzwrite(m_fp, (voidp) buf, len);
- }
-
- /* Flushes all pending output into the compressed file. The parameter
- * _flush is as in the deflate() function. The return value is the zlib
- * error number (see function gzerror below). flush() returns Z_OK if
- * the flush_ parameter is Z_FINISH and all output could be flushed.
- * flush() should be called only when strictly necessary because it can
- * degrade compression.
- */
- int flush(int _flush) {
- os_flush();
- return ::gzflush(m_fp, _flush);
- }
-
- /* Returns the error message for the last error which occurred on the
- * given compressed file. errnum is set to zlib error number. If an
- * error occurred in the file system and not in the compression library,
- * errnum is set to Z_ERRNO and the application may consult errno
- * to get the exact error code.
- */
- const char* error(int* errnum) {
- return ::gzerror(m_fp, errnum);
- }
-
- gzFile fp() { return m_fp; }
-
- ostream& os() {
- if (m_os == 0) m_os = new ostrstream;
- return *m_os;
- }
-
- void os_flush() {
- if (m_os && m_os->pcount()>0) {
- ostrstream* oss = new ostrstream;
- oss->fill(m_os->fill());
- oss->flags(m_os->flags());
- oss->precision(m_os->precision());
- oss->width(m_os->width());
- ::gzwrite(m_fp, m_os->str(), m_os->pcount());
- delete[] m_os->str(); delete m_os; m_os = oss;
- }
- }
-
- private:
- gzFile m_fp;
- ostrstream* m_os;
-};
-
-/*
- * Binary write the given (array of) object(s) into the compressed file.
- * returns the number of uncompressed bytes actually written
- * (0 in case of error).
- */
-template <class T, class Items>
-inline int write(ozstream& zs, const T* x, Items items) {
- return ::gzwrite(zs.fp(), (voidp) x, items*sizeof(T));
-}
-
-/*
- * Binary output with the '<' operator.
- */
-template <class T>
-inline ozstream& operator<(ozstream& zs, const T& x) {
- ::gzwrite(zs.fp(), (voidp) &x, sizeof(T));
- return zs;
-}
-
-inline zstringlen::zstringlen(ozstream& zs, const char* x) {
- val.byte = 255; val.word = ::strlen(x);
- if (val.word < 255) zs < (val.byte = val.word);
- else zs < val;
-}
-
-/*
- * Write length of string + the string with the '<' operator.
- */
-inline ozstream& operator<(ozstream& zs, const char* x) {
- zstringlen len(zs, x);
- ::gzwrite(zs.fp(), (voidp) x, len.value());
- return zs;
-}
-
-#ifdef _MSC_VER
-inline ozstream& operator<(ozstream& zs, char* const& x) {
- return zs < (const char*) x;
-}
-#endif
-
-/*
- * Ascii write with the << operator;
- */
-template <class T>
-inline ostream& operator<<(ozstream& zs, const T& x) {
- zs.os_flush();
- return zs.os() << x;
-}
-
-#endif
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/iostream2/zstream_test.cpp
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/iostream2/zstream_test.cpp b/c++/libs/zlib-1.2.8/contrib/iostream2/zstream_test.cpp
deleted file mode 100644
index 6273f62..0000000
--- a/c++/libs/zlib-1.2.8/contrib/iostream2/zstream_test.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-#include "zstream.h"
-#include <math.h>
-#include <stdlib.h>
-#include <iomanip.h>
-
-void main() {
- char h[256] = "Hello";
- char* g = "Goodbye";
- ozstream out("temp.gz");
- out < "This works well" < h < g;
- out.close();
-
- izstream in("temp.gz"); // read it back
- char *x = read_string(in), *y = new char[256], z[256];
- in > y > z;
- in.close();
- cout << x << endl << y << endl << z << endl;
-
- out.open("temp.gz"); // try ascii output; zcat temp.gz to see the results
- out << setw(50) << setfill('#') << setprecision(20) << x << endl << y << endl << z << endl;
- out << z << endl << y << endl << x << endl;
- out << 1.1234567890123456789 << endl;
-
- delete[] x; delete[] y;
-}
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/iostream3/README
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/iostream3/README b/c++/libs/zlib-1.2.8/contrib/iostream3/README
deleted file mode 100644
index f7b319a..0000000
--- a/c++/libs/zlib-1.2.8/contrib/iostream3/README
+++ /dev/null
@@ -1,35 +0,0 @@
-These classes provide a C++ stream interface to the zlib library. It allows you
-to do things like:
-
- gzofstream outf("blah.gz");
- outf << "These go into the gzip file " << 123 << endl;
-
-It does this by deriving a specialized stream buffer for gzipped files, which is
-the way Stroustrup would have done it. :->
-
-The gzifstream and gzofstream classes were originally written by Kevin Ruland
-and made available in the zlib contrib/iostream directory. The older version still
-compiles under gcc 2.xx, but not under gcc 3.xx, which sparked the development of
-this version.
-
-The new classes are as standard-compliant as possible, closely following the
-approach of the standard library's fstream classes. It compiles under gcc versions
-3.2 and 3.3, but not under gcc 2.xx. This is mainly due to changes in the standard
-library naming scheme. The new version of gzifstream/gzofstream/gzfilebuf differs
-from the previous one in the following respects:
-- added showmanyc
-- added setbuf, with support for unbuffered output via setbuf(0,0)
-- a few bug fixes of stream behavior
-- gzipped output file opened with default compression level instead of maximum level
-- setcompressionlevel()/strategy() members replaced by single setcompression()
-
-The code is provided "as is", with the permission to use, copy, modify, distribute
-and sell it for any purpose without fee.
-
-Ludwig Schwardt
-<sc...@sun.ac.za>
-
-DSP Lab
-Electrical & Electronic Engineering Department
-University of Stellenbosch
-South Africa
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/iostream3/TODO
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/iostream3/TODO b/c++/libs/zlib-1.2.8/contrib/iostream3/TODO
deleted file mode 100644
index 7032f97..0000000
--- a/c++/libs/zlib-1.2.8/contrib/iostream3/TODO
+++ /dev/null
@@ -1,17 +0,0 @@
-Possible upgrades to gzfilebuf:
-
-- The ability to do putback (e.g. putbackfail)
-
-- The ability to seek (zlib supports this, but could be slow/tricky)
-
-- Simultaneous read/write access (does it make sense?)
-
-- Support for ios_base::ate open mode
-
-- Locale support?
-
-- Check public interface to see which calls give problems
- (due to dependence on library internals)
-
-- Override operator<<(ostream&, gzfilebuf*) to allow direct copying
- of stream buffer to stream ( i.e. os << is.rdbuf(); )
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/iostream3/test.cc
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/iostream3/test.cc b/c++/libs/zlib-1.2.8/contrib/iostream3/test.cc
deleted file mode 100644
index 9423533..0000000
--- a/c++/libs/zlib-1.2.8/contrib/iostream3/test.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Test program for gzifstream and gzofstream
- *
- * by Ludwig Schwardt <sc...@sun.ac.za>
- * original version by Kevin Ruland <ke...@rodin.wustl.edu>
- */
-
-#include "zfstream.h"
-#include <iostream> // for cout
-
-int main() {
-
- gzofstream outf;
- gzifstream inf;
- char buf[80];
-
- outf.open("test1.txt.gz");
- outf << "The quick brown fox sidestepped the lazy canine\n"
- << 1.3 << "\nPlan " << 9 << std::endl;
- outf.close();
- std::cout << "Wrote the following message to 'test1.txt.gz' (check with zcat or zless):\n"
- << "The quick brown fox sidestepped the lazy canine\n"
- << 1.3 << "\nPlan " << 9 << std::endl;
-
- std::cout << "\nReading 'test1.txt.gz' (buffered) produces:\n";
- inf.open("test1.txt.gz");
- while (inf.getline(buf,80,'\n')) {
- std::cout << buf << "\t(" << inf.rdbuf()->in_avail() << " chars left in buffer)\n";
- }
- inf.close();
-
- outf.rdbuf()->pubsetbuf(0,0);
- outf.open("test2.txt.gz");
- outf << setcompression(Z_NO_COMPRESSION)
- << "The quick brown fox sidestepped the lazy canine\n"
- << 1.3 << "\nPlan " << 9 << std::endl;
- outf.close();
- std::cout << "\nWrote the same message to 'test2.txt.gz' in uncompressed form";
-
- std::cout << "\nReading 'test2.txt.gz' (unbuffered) produces:\n";
- inf.rdbuf()->pubsetbuf(0,0);
- inf.open("test2.txt.gz");
- while (inf.getline(buf,80,'\n')) {
- std::cout << buf << "\t(" << inf.rdbuf()->in_avail() << " chars left in buffer)\n";
- }
- inf.close();
-
- return 0;
-
-}
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/iostream3/zfstream.cc
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/iostream3/zfstream.cc b/c++/libs/zlib-1.2.8/contrib/iostream3/zfstream.cc
deleted file mode 100644
index 94eb933..0000000
--- a/c++/libs/zlib-1.2.8/contrib/iostream3/zfstream.cc
+++ /dev/null
@@ -1,479 +0,0 @@
-/*
- * A C++ I/O streams interface to the zlib gz* functions
- *
- * by Ludwig Schwardt <sc...@sun.ac.za>
- * original version by Kevin Ruland <ke...@rodin.wustl.edu>
- *
- * This version is standard-compliant and compatible with gcc 3.x.
- */
-
-#include "zfstream.h"
-#include <cstring> // for strcpy, strcat, strlen (mode strings)
-#include <cstdio> // for BUFSIZ
-
-// Internal buffer sizes (default and "unbuffered" versions)
-#define BIGBUFSIZE BUFSIZ
-#define SMALLBUFSIZE 1
-
-/*****************************************************************************/
-
-// Default constructor
-gzfilebuf::gzfilebuf()
-: file(NULL), io_mode(std::ios_base::openmode(0)), own_fd(false),
- buffer(NULL), buffer_size(BIGBUFSIZE), own_buffer(true)
-{
- // No buffers to start with
- this->disable_buffer();
-}
-
-// Destructor
-gzfilebuf::~gzfilebuf()
-{
- // Sync output buffer and close only if responsible for file
- // (i.e. attached streams should be left open at this stage)
- this->sync();
- if (own_fd)
- this->close();
- // Make sure internal buffer is deallocated
- this->disable_buffer();
-}
-
-// Set compression level and strategy
-int
-gzfilebuf::setcompression(int comp_level,
- int comp_strategy)
-{
- return gzsetparams(file, comp_level, comp_strategy);
-}
-
-// Open gzipped file
-gzfilebuf*
-gzfilebuf::open(const char *name,
- std::ios_base::openmode mode)
-{
- // Fail if file already open
- if (this->is_open())
- return NULL;
- // Don't support simultaneous read/write access (yet)
- if ((mode & std::ios_base::in) && (mode & std::ios_base::out))
- return NULL;
-
- // Build mode string for gzopen and check it [27.8.1.3.2]
- char char_mode[6] = "\0\0\0\0\0";
- if (!this->open_mode(mode, char_mode))
- return NULL;
-
- // Attempt to open file
- if ((file = gzopen(name, char_mode)) == NULL)
- return NULL;
-
- // On success, allocate internal buffer and set flags
- this->enable_buffer();
- io_mode = mode;
- own_fd = true;
- return this;
-}
-
-// Attach to gzipped file
-gzfilebuf*
-gzfilebuf::attach(int fd,
- std::ios_base::openmode mode)
-{
- // Fail if file already open
- if (this->is_open())
- return NULL;
- // Don't support simultaneous read/write access (yet)
- if ((mode & std::ios_base::in) && (mode & std::ios_base::out))
- return NULL;
-
- // Build mode string for gzdopen and check it [27.8.1.3.2]
- char char_mode[6] = "\0\0\0\0\0";
- if (!this->open_mode(mode, char_mode))
- return NULL;
-
- // Attempt to attach to file
- if ((file = gzdopen(fd, char_mode)) == NULL)
- return NULL;
-
- // On success, allocate internal buffer and set flags
- this->enable_buffer();
- io_mode = mode;
- own_fd = false;
- return this;
-}
-
-// Close gzipped file
-gzfilebuf*
-gzfilebuf::close()
-{
- // Fail immediately if no file is open
- if (!this->is_open())
- return NULL;
- // Assume success
- gzfilebuf* retval = this;
- // Attempt to sync and close gzipped file
- if (this->sync() == -1)
- retval = NULL;
- if (gzclose(file) < 0)
- retval = NULL;
- // File is now gone anyway (postcondition [27.8.1.3.8])
- file = NULL;
- own_fd = false;
- // Destroy internal buffer if it exists
- this->disable_buffer();
- return retval;
-}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-// Convert int open mode to mode string
-bool
-gzfilebuf::open_mode(std::ios_base::openmode mode,
- char* c_mode) const
-{
- bool testb = mode & std::ios_base::binary;
- bool testi = mode & std::ios_base::in;
- bool testo = mode & std::ios_base::out;
- bool testt = mode & std::ios_base::trunc;
- bool testa = mode & std::ios_base::app;
-
- // Check for valid flag combinations - see [27.8.1.3.2] (Table 92)
- // Original zfstream hardcoded the compression level to maximum here...
- // Double the time for less than 1% size improvement seems
- // excessive though - keeping it at the default level
- // To change back, just append "9" to the next three mode strings
- if (!testi && testo && !testt && !testa)
- strcpy(c_mode, "w");
- if (!testi && testo && !testt && testa)
- strcpy(c_mode, "a");
- if (!testi && testo && testt && !testa)
- strcpy(c_mode, "w");
- if (testi && !testo && !testt && !testa)
- strcpy(c_mode, "r");
- // No read/write mode yet
-// if (testi && testo && !testt && !testa)
-// strcpy(c_mode, "r+");
-// if (testi && testo && testt && !testa)
-// strcpy(c_mode, "w+");
-
- // Mode string should be empty for invalid combination of flags
- if (strlen(c_mode) == 0)
- return false;
- if (testb)
- strcat(c_mode, "b");
- return true;
-}
-
-// Determine number of characters in internal get buffer
-std::streamsize
-gzfilebuf::showmanyc()
-{
- // Calls to underflow will fail if file not opened for reading
- if (!this->is_open() || !(io_mode & std::ios_base::in))
- return -1;
- // Make sure get area is in use
- if (this->gptr() && (this->gptr() < this->egptr()))
- return std::streamsize(this->egptr() - this->gptr());
- else
- return 0;
-}
-
-// Fill get area from gzipped file
-gzfilebuf::int_type
-gzfilebuf::underflow()
-{
- // If something is left in the get area by chance, return it
- // (this shouldn't normally happen, as underflow is only supposed
- // to be called when gptr >= egptr, but it serves as error check)
- if (this->gptr() && (this->gptr() < this->egptr()))
- return traits_type::to_int_type(*(this->gptr()));
-
- // If the file hasn't been opened for reading, produce error
- if (!this->is_open() || !(io_mode & std::ios_base::in))
- return traits_type::eof();
-
- // Attempt to fill internal buffer from gzipped file
- // (buffer must be guaranteed to exist...)
- int bytes_read = gzread(file, buffer, buffer_size);
- // Indicates error or EOF
- if (bytes_read <= 0)
- {
- // Reset get area
- this->setg(buffer, buffer, buffer);
- return traits_type::eof();
- }
- // Make all bytes read from file available as get area
- this->setg(buffer, buffer, buffer + bytes_read);
-
- // Return next character in get area
- return traits_type::to_int_type(*(this->gptr()));
-}
-
-// Write put area to gzipped file
-gzfilebuf::int_type
-gzfilebuf::overflow(int_type c)
-{
- // Determine whether put area is in use
- if (this->pbase())
- {
- // Double-check pointer range
- if (this->pptr() > this->epptr() || this->pptr() < this->pbase())
- return traits_type::eof();
- // Add extra character to buffer if not EOF
- if (!traits_type::eq_int_type(c, traits_type::eof()))
- {
- *(this->pptr()) = traits_type::to_char_type(c);
- this->pbump(1);
- }
- // Number of characters to write to file
- int bytes_to_write = this->pptr() - this->pbase();
- // Overflow doesn't fail if nothing is to be written
- if (bytes_to_write > 0)
- {
- // If the file hasn't been opened for writing, produce error
- if (!this->is_open() || !(io_mode & std::ios_base::out))
- return traits_type::eof();
- // If gzipped file won't accept all bytes written to it, fail
- if (gzwrite(file, this->pbase(), bytes_to_write) != bytes_to_write)
- return traits_type::eof();
- // Reset next pointer to point to pbase on success
- this->pbump(-bytes_to_write);
- }
- }
- // Write extra character to file if not EOF
- else if (!traits_type::eq_int_type(c, traits_type::eof()))
- {
- // If the file hasn't been opened for writing, produce error
- if (!this->is_open() || !(io_mode & std::ios_base::out))
- return traits_type::eof();
- // Impromptu char buffer (allows "unbuffered" output)
- char_type last_char = traits_type::to_char_type(c);
- // If gzipped file won't accept this character, fail
- if (gzwrite(file, &last_char, 1) != 1)
- return traits_type::eof();
- }
-
- // If you got here, you have succeeded (even if c was EOF)
- // The return value should therefore be non-EOF
- if (traits_type::eq_int_type(c, traits_type::eof()))
- return traits_type::not_eof(c);
- else
- return c;
-}
-
-// Assign new buffer
-std::streambuf*
-gzfilebuf::setbuf(char_type* p,
- std::streamsize n)
-{
- // First make sure stuff is sync'ed, for safety
- if (this->sync() == -1)
- return NULL;
- // If buffering is turned off on purpose via setbuf(0,0), still allocate one...
- // "Unbuffered" only really refers to put [27.8.1.4.10], while get needs at
- // least a buffer of size 1 (very inefficient though, therefore make it bigger?)
- // This follows from [27.5.2.4.3]/12 (gptr needs to point at something, it seems)
- if (!p || !n)
- {
- // Replace existing buffer (if any) with small internal buffer
- this->disable_buffer();
- buffer = NULL;
- buffer_size = 0;
- own_buffer = true;
- this->enable_buffer();
- }
- else
- {
- // Replace existing buffer (if any) with external buffer
- this->disable_buffer();
- buffer = p;
- buffer_size = n;
- own_buffer = false;
- this->enable_buffer();
- }
- return this;
-}
-
-// Write put area to gzipped file (i.e. ensures that put area is empty)
-int
-gzfilebuf::sync()
-{
- return traits_type::eq_int_type(this->overflow(), traits_type::eof()) ? -1 : 0;
-}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-// Allocate internal buffer
-void
-gzfilebuf::enable_buffer()
-{
- // If internal buffer required, allocate one
- if (own_buffer && !buffer)
- {
- // Check for buffered vs. "unbuffered"
- if (buffer_size > 0)
- {
- // Allocate internal buffer
- buffer = new char_type[buffer_size];
- // Get area starts empty and will be expanded by underflow as need arises
- this->setg(buffer, buffer, buffer);
- // Setup entire internal buffer as put area.
- // The one-past-end pointer actually points to the last element of the buffer,
- // so that overflow(c) can safely add the extra character c to the sequence.
- // These pointers remain in place for the duration of the buffer
- this->setp(buffer, buffer + buffer_size - 1);
- }
- else
- {
- // Even in "unbuffered" case, (small?) get buffer is still required
- buffer_size = SMALLBUFSIZE;
- buffer = new char_type[buffer_size];
- this->setg(buffer, buffer, buffer);
- // "Unbuffered" means no put buffer
- this->setp(0, 0);
- }
- }
- else
- {
- // If buffer already allocated, reset buffer pointers just to make sure no
- // stale chars are lying around
- this->setg(buffer, buffer, buffer);
- this->setp(buffer, buffer + buffer_size - 1);
- }
-}
-
-// Destroy internal buffer
-void
-gzfilebuf::disable_buffer()
-{
- // If internal buffer exists, deallocate it
- if (own_buffer && buffer)
- {
- // Preserve unbuffered status by zeroing size
- if (!this->pbase())
- buffer_size = 0;
- delete[] buffer;
- buffer = NULL;
- this->setg(0, 0, 0);
- this->setp(0, 0);
- }
- else
- {
- // Reset buffer pointers to initial state if external buffer exists
- this->setg(buffer, buffer, buffer);
- if (buffer)
- this->setp(buffer, buffer + buffer_size - 1);
- else
- this->setp(0, 0);
- }
-}
-
-/*****************************************************************************/
-
-// Default constructor initializes stream buffer
-gzifstream::gzifstream()
-: std::istream(NULL), sb()
-{ this->init(&sb); }
-
-// Initialize stream buffer and open file
-gzifstream::gzifstream(const char* name,
- std::ios_base::openmode mode)
-: std::istream(NULL), sb()
-{
- this->init(&sb);
- this->open(name, mode);
-}
-
-// Initialize stream buffer and attach to file
-gzifstream::gzifstream(int fd,
- std::ios_base::openmode mode)
-: std::istream(NULL), sb()
-{
- this->init(&sb);
- this->attach(fd, mode);
-}
-
-// Open file and go into fail() state if unsuccessful
-void
-gzifstream::open(const char* name,
- std::ios_base::openmode mode)
-{
- if (!sb.open(name, mode | std::ios_base::in))
- this->setstate(std::ios_base::failbit);
- else
- this->clear();
-}
-
-// Attach to file and go into fail() state if unsuccessful
-void
-gzifstream::attach(int fd,
- std::ios_base::openmode mode)
-{
- if (!sb.attach(fd, mode | std::ios_base::in))
- this->setstate(std::ios_base::failbit);
- else
- this->clear();
-}
-
-// Close file
-void
-gzifstream::close()
-{
- if (!sb.close())
- this->setstate(std::ios_base::failbit);
-}
-
-/*****************************************************************************/
-
-// Default constructor initializes stream buffer
-gzofstream::gzofstream()
-: std::ostream(NULL), sb()
-{ this->init(&sb); }
-
-// Initialize stream buffer and open file
-gzofstream::gzofstream(const char* name,
- std::ios_base::openmode mode)
-: std::ostream(NULL), sb()
-{
- this->init(&sb);
- this->open(name, mode);
-}
-
-// Initialize stream buffer and attach to file
-gzofstream::gzofstream(int fd,
- std::ios_base::openmode mode)
-: std::ostream(NULL), sb()
-{
- this->init(&sb);
- this->attach(fd, mode);
-}
-
-// Open file and go into fail() state if unsuccessful
-void
-gzofstream::open(const char* name,
- std::ios_base::openmode mode)
-{
- if (!sb.open(name, mode | std::ios_base::out))
- this->setstate(std::ios_base::failbit);
- else
- this->clear();
-}
-
-// Attach to file and go into fail() state if unsuccessful
-void
-gzofstream::attach(int fd,
- std::ios_base::openmode mode)
-{
- if (!sb.attach(fd, mode | std::ios_base::out))
- this->setstate(std::ios_base::failbit);
- else
- this->clear();
-}
-
-// Close file
-void
-gzofstream::close()
-{
- if (!sb.close())
- this->setstate(std::ios_base::failbit);
-}
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/iostream3/zfstream.h
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/iostream3/zfstream.h b/c++/libs/zlib-1.2.8/contrib/iostream3/zfstream.h
deleted file mode 100644
index 8574479..0000000
--- a/c++/libs/zlib-1.2.8/contrib/iostream3/zfstream.h
+++ /dev/null
@@ -1,466 +0,0 @@
-/*
- * A C++ I/O streams interface to the zlib gz* functions
- *
- * by Ludwig Schwardt <sc...@sun.ac.za>
- * original version by Kevin Ruland <ke...@rodin.wustl.edu>
- *
- * This version is standard-compliant and compatible with gcc 3.x.
- */
-
-#ifndef ZFSTREAM_H
-#define ZFSTREAM_H
-
-#include <istream> // not iostream, since we don't need cin/cout
-#include <ostream>
-#include "zlib.h"
-
-/*****************************************************************************/
-
-/**
- * @brief Gzipped file stream buffer class.
- *
- * This class implements basic_filebuf for gzipped files. It doesn't yet support
- * seeking (allowed by zlib but slow/limited), putback and read/write access
- * (tricky). Otherwise, it attempts to be a drop-in replacement for the standard
- * file streambuf.
-*/
-class gzfilebuf : public std::streambuf
-{
-public:
- // Default constructor.
- gzfilebuf();
-
- // Destructor.
- virtual
- ~gzfilebuf();
-
- /**
- * @brief Set compression level and strategy on the fly.
- * @param comp_level Compression level (see zlib.h for allowed values)
- * @param comp_strategy Compression strategy (see zlib.h for allowed values)
- * @return Z_OK on success, Z_STREAM_ERROR otherwise.
- *
- * Unfortunately, these parameters cannot be modified separately, as the
- * previous zfstream version assumed. Since the strategy is seldom changed,
- * it can default and setcompression(level) then becomes like the old
- * setcompressionlevel(level).
- */
- int
- setcompression(int comp_level,
- int comp_strategy = Z_DEFAULT_STRATEGY);
-
- /**
- * @brief Check if file is open.
- * @return True if file is open.
- */
- bool
- is_open() const { return (file != NULL); }
-
- /**
- * @brief Open gzipped file.
- * @param name File name.
- * @param mode Open mode flags.
- * @return @c this on success, NULL on failure.
- */
- gzfilebuf*
- open(const char* name,
- std::ios_base::openmode mode);
-
- /**
- * @brief Attach to already open gzipped file.
- * @param fd File descriptor.
- * @param mode Open mode flags.
- * @return @c this on success, NULL on failure.
- */
- gzfilebuf*
- attach(int fd,
- std::ios_base::openmode mode);
-
- /**
- * @brief Close gzipped file.
- * @return @c this on success, NULL on failure.
- */
- gzfilebuf*
- close();
-
-protected:
- /**
- * @brief Convert ios open mode int to mode string used by zlib.
- * @return True if valid mode flag combination.
- */
- bool
- open_mode(std::ios_base::openmode mode,
- char* c_mode) const;
-
- /**
- * @brief Number of characters available in stream buffer.
- * @return Number of characters.
- *
- * This indicates number of characters in get area of stream buffer.
- * These characters can be read without accessing the gzipped file.
- */
- virtual std::streamsize
- showmanyc();
-
- /**
- * @brief Fill get area from gzipped file.
- * @return First character in get area on success, EOF on error.
- *
- * This actually reads characters from gzipped file to stream
- * buffer. Always buffered.
- */
- virtual int_type
- underflow();
-
- /**
- * @brief Write put area to gzipped file.
- * @param c Extra character to add to buffer contents.
- * @return Non-EOF on success, EOF on error.
- *
- * This actually writes characters in stream buffer to
- * gzipped file. With unbuffered output this is done one
- * character at a time.
- */
- virtual int_type
- overflow(int_type c = traits_type::eof());
-
- /**
- * @brief Installs external stream buffer.
- * @param p Pointer to char buffer.
- * @param n Size of external buffer.
- * @return @c this on success, NULL on failure.
- *
- * Call setbuf(0,0) to enable unbuffered output.
- */
- virtual std::streambuf*
- setbuf(char_type* p,
- std::streamsize n);
-
- /**
- * @brief Flush stream buffer to file.
- * @return 0 on success, -1 on error.
- *
- * This calls underflow(EOF) to do the job.
- */
- virtual int
- sync();
-
-//
-// Some future enhancements
-//
-// virtual int_type uflow();
-// virtual int_type pbackfail(int_type c = traits_type::eof());
-// virtual pos_type
-// seekoff(off_type off,
-// std::ios_base::seekdir way,
-// std::ios_base::openmode mode = std::ios_base::in|std::ios_base::out);
-// virtual pos_type
-// seekpos(pos_type sp,
-// std::ios_base::openmode mode = std::ios_base::in|std::ios_base::out);
-
-private:
- /**
- * @brief Allocate internal buffer.
- *
- * This function is safe to call multiple times. It will ensure
- * that a proper internal buffer exists if it is required. If the
- * buffer already exists or is external, the buffer pointers will be
- * reset to their original state.
- */
- void
- enable_buffer();
-
- /**
- * @brief Destroy internal buffer.
- *
- * This function is safe to call multiple times. It will ensure
- * that the internal buffer is deallocated if it exists. In any
- * case, it will also reset the buffer pointers.
- */
- void
- disable_buffer();
-
- /**
- * Underlying file pointer.
- */
- gzFile file;
-
- /**
- * Mode in which file was opened.
- */
- std::ios_base::openmode io_mode;
-
- /**
- * @brief True if this object owns file descriptor.
- *
- * This makes the class responsible for closing the file
- * upon destruction.
- */
- bool own_fd;
-
- /**
- * @brief Stream buffer.
- *
- * For simplicity this remains allocated on the free store for the
- * entire life span of the gzfilebuf object, unless replaced by setbuf.
- */
- char_type* buffer;
-
- /**
- * @brief Stream buffer size.
- *
- * Defaults to system default buffer size (typically 8192 bytes).
- * Modified by setbuf.
- */
- std::streamsize buffer_size;
-
- /**
- * @brief True if this object owns stream buffer.
- *
- * This makes the class responsible for deleting the buffer
- * upon destruction.
- */
- bool own_buffer;
-};
-
-/*****************************************************************************/
-
-/**
- * @brief Gzipped file input stream class.
- *
- * This class implements ifstream for gzipped files. Seeking and putback
- * is not supported yet.
-*/
-class gzifstream : public std::istream
-{
-public:
- // Default constructor
- gzifstream();
-
- /**
- * @brief Construct stream on gzipped file to be opened.
- * @param name File name.
- * @param mode Open mode flags (forced to contain ios::in).
- */
- explicit
- gzifstream(const char* name,
- std::ios_base::openmode mode = std::ios_base::in);
-
- /**
- * @brief Construct stream on already open gzipped file.
- * @param fd File descriptor.
- * @param mode Open mode flags (forced to contain ios::in).
- */
- explicit
- gzifstream(int fd,
- std::ios_base::openmode mode = std::ios_base::in);
-
- /**
- * Obtain underlying stream buffer.
- */
- gzfilebuf*
- rdbuf() const
- { return const_cast<gzfilebuf*>(&sb); }
-
- /**
- * @brief Check if file is open.
- * @return True if file is open.
- */
- bool
- is_open() { return sb.is_open(); }
-
- /**
- * @brief Open gzipped file.
- * @param name File name.
- * @param mode Open mode flags (forced to contain ios::in).
- *
- * Stream will be in state good() if file opens successfully;
- * otherwise in state fail(). This differs from the behavior of
- * ifstream, which never sets the state to good() and therefore
- * won't allow you to reuse the stream for a second file unless
- * you manually clear() the state. The choice is a matter of
- * convenience.
- */
- void
- open(const char* name,
- std::ios_base::openmode mode = std::ios_base::in);
-
- /**
- * @brief Attach to already open gzipped file.
- * @param fd File descriptor.
- * @param mode Open mode flags (forced to contain ios::in).
- *
- * Stream will be in state good() if attach succeeded; otherwise
- * in state fail().
- */
- void
- attach(int fd,
- std::ios_base::openmode mode = std::ios_base::in);
-
- /**
- * @brief Close gzipped file.
- *
- * Stream will be in state fail() if close failed.
- */
- void
- close();
-
-private:
- /**
- * Underlying stream buffer.
- */
- gzfilebuf sb;
-};
-
-/*****************************************************************************/
-
-/**
- * @brief Gzipped file output stream class.
- *
- * This class implements ofstream for gzipped files. Seeking and putback
- * is not supported yet.
-*/
-class gzofstream : public std::ostream
-{
-public:
- // Default constructor
- gzofstream();
-
- /**
- * @brief Construct stream on gzipped file to be opened.
- * @param name File name.
- * @param mode Open mode flags (forced to contain ios::out).
- */
- explicit
- gzofstream(const char* name,
- std::ios_base::openmode mode = std::ios_base::out);
-
- /**
- * @brief Construct stream on already open gzipped file.
- * @param fd File descriptor.
- * @param mode Open mode flags (forced to contain ios::out).
- */
- explicit
- gzofstream(int fd,
- std::ios_base::openmode mode = std::ios_base::out);
-
- /**
- * Obtain underlying stream buffer.
- */
- gzfilebuf*
- rdbuf() const
- { return const_cast<gzfilebuf*>(&sb); }
-
- /**
- * @brief Check if file is open.
- * @return True if file is open.
- */
- bool
- is_open() { return sb.is_open(); }
-
- /**
- * @brief Open gzipped file.
- * @param name File name.
- * @param mode Open mode flags (forced to contain ios::out).
- *
- * Stream will be in state good() if file opens successfully;
- * otherwise in state fail(). This differs from the behavior of
- * ofstream, which never sets the state to good() and therefore
- * won't allow you to reuse the stream for a second file unless
- * you manually clear() the state. The choice is a matter of
- * convenience.
- */
- void
- open(const char* name,
- std::ios_base::openmode mode = std::ios_base::out);
-
- /**
- * @brief Attach to already open gzipped file.
- * @param fd File descriptor.
- * @param mode Open mode flags (forced to contain ios::out).
- *
- * Stream will be in state good() if attach succeeded; otherwise
- * in state fail().
- */
- void
- attach(int fd,
- std::ios_base::openmode mode = std::ios_base::out);
-
- /**
- * @brief Close gzipped file.
- *
- * Stream will be in state fail() if close failed.
- */
- void
- close();
-
-private:
- /**
- * Underlying stream buffer.
- */
- gzfilebuf sb;
-};
-
-/*****************************************************************************/
-
-/**
- * @brief Gzipped file output stream manipulator class.
- *
- * This class defines a two-argument manipulator for gzofstream. It is used
- * as base for the setcompression(int,int) manipulator.
-*/
-template<typename T1, typename T2>
- class gzomanip2
- {
- public:
- // Allows insertor to peek at internals
- template <typename Ta, typename Tb>
- friend gzofstream&
- operator<<(gzofstream&,
- const gzomanip2<Ta,Tb>&);
-
- // Constructor
- gzomanip2(gzofstream& (*f)(gzofstream&, T1, T2),
- T1 v1,
- T2 v2);
- private:
- // Underlying manipulator function
- gzofstream&
- (*func)(gzofstream&, T1, T2);
-
- // Arguments for manipulator function
- T1 val1;
- T2 val2;
- };
-
-/*****************************************************************************/
-
-// Manipulator function thunks through to stream buffer
-inline gzofstream&
-setcompression(gzofstream &gzs, int l, int s = Z_DEFAULT_STRATEGY)
-{
- (gzs.rdbuf())->setcompression(l, s);
- return gzs;
-}
-
-// Manipulator constructor stores arguments
-template<typename T1, typename T2>
- inline
- gzomanip2<T1,T2>::gzomanip2(gzofstream &(*f)(gzofstream &, T1, T2),
- T1 v1,
- T2 v2)
- : func(f), val1(v1), val2(v2)
- { }
-
-// Insertor applies underlying manipulator function to stream
-template<typename T1, typename T2>
- inline gzofstream&
- operator<<(gzofstream& s, const gzomanip2<T1,T2>& m)
- { return (*m.func)(s, m.val1, m.val2); }
-
-// Insert this onto stream to simplify setting of compression level
-inline gzomanip2<int,int>
-setcompression(int l, int s = Z_DEFAULT_STRATEGY)
-{ return gzomanip2<int,int>(&setcompression, l, s); }
-
-#endif // ZFSTREAM_H
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/masmx64/bld_ml64.bat
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/masmx64/bld_ml64.bat b/c++/libs/zlib-1.2.8/contrib/masmx64/bld_ml64.bat
deleted file mode 100644
index f74bcef..0000000
--- a/c++/libs/zlib-1.2.8/contrib/masmx64/bld_ml64.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-ml64.exe /Flinffasx64 /c /Zi inffasx64.asm
-ml64.exe /Flgvmat64 /c /Zi gvmat64.asm
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/masmx64/gvmat64.asm
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/masmx64/gvmat64.asm b/c++/libs/zlib-1.2.8/contrib/masmx64/gvmat64.asm
deleted file mode 100644
index c1817f1..0000000
--- a/c++/libs/zlib-1.2.8/contrib/masmx64/gvmat64.asm
+++ /dev/null
@@ -1,553 +0,0 @@
-;uInt longest_match_x64(
-; deflate_state *s,
-; IPos cur_match); /* current match */
-
-; gvmat64.asm -- Asm portion of the optimized longest_match for 32 bits x86_64
-; (AMD64 on Athlon 64, Opteron, Phenom
-; and Intel EM64T on Pentium 4 with EM64T, Pentium D, Core 2 Duo, Core I5/I7)
-; Copyright (C) 1995-2010 Jean-loup Gailly, Brian Raiter and Gilles Vollant.
-;
-; File written by Gilles Vollant, by converting to assembly the longest_match
-; from Jean-loup Gailly in deflate.c of zLib and infoZip zip.
-;
-; and by taking inspiration on asm686 with masm, optimised assembly code
-; from Brian Raiter, written 1998
-;
-; This software is provided 'as-is', without any express or implied
-; warranty. In no event will the authors be held liable for any damages
-; arising from the use of this software.
-;
-; Permission is granted to anyone to use this software for any purpose,
-; including commercial applications, and to alter it and redistribute it
-; freely, subject to the following restrictions:
-;
-; 1. The origin of this software must not be misrepresented; you must not
-; claim that you wrote the original software. If you use this software
-; in a product, an acknowledgment in the product documentation would be
-; appreciated but is not required.
-; 2. Altered source versions must be plainly marked as such, and must not be
-; misrepresented as being the original software
-; 3. This notice may not be removed or altered from any source distribution.
-;
-;
-;
-; http://www.zlib.net
-; http://www.winimage.com/zLibDll
-; http://www.muppetlabs.com/~breadbox/software/assembly.html
-;
-; to compile this file for infozip Zip, I use option:
-; ml64.exe /Flgvmat64 /c /Zi /DINFOZIP gvmat64.asm
-;
-; to compile this file for zLib, I use option:
-; ml64.exe /Flgvmat64 /c /Zi gvmat64.asm
-; Be carrefull to adapt zlib1222add below to your version of zLib
-; (if you use a version of zLib before 1.0.4 or after 1.2.2.2, change
-; value of zlib1222add later)
-;
-; This file compile with Microsoft Macro Assembler (x64) for AMD64
-;
-; ml64.exe is given with Visual Studio 2005/2008/2010 and Windows WDK
-;
-; (you can get Windows WDK with ml64 for AMD64 from
-; http://www.microsoft.com/whdc/Devtools/wdk/default.mspx for low price)
-;
-
-
-;uInt longest_match(s, cur_match)
-; deflate_state *s;
-; IPos cur_match; /* current match */
-.code
-longest_match PROC
-
-
-;LocalVarsSize equ 88
- LocalVarsSize equ 72
-
-; register used : rax,rbx,rcx,rdx,rsi,rdi,r8,r9,r10,r11,r12
-; free register : r14,r15
-; register can be saved : rsp
-
- chainlenwmask equ rsp + 8 - LocalVarsSize ; high word: current chain len
- ; low word: s->wmask
-;window equ rsp + xx - LocalVarsSize ; local copy of s->window ; stored in r10
-;windowbestlen equ rsp + xx - LocalVarsSize ; s->window + bestlen , use r10+r11
-;scanstart equ rsp + xx - LocalVarsSize ; first two bytes of string ; stored in r12w
-;scanend equ rsp + xx - LocalVarsSize ; last two bytes of string use ebx
-;scanalign equ rsp + xx - LocalVarsSize ; dword-misalignment of string r13
-;bestlen equ rsp + xx - LocalVarsSize ; size of best match so far -> r11d
-;scan equ rsp + xx - LocalVarsSize ; ptr to string wanting match -> r9
-IFDEF INFOZIP
-ELSE
- nicematch equ (rsp + 16 - LocalVarsSize) ; a good enough match size
-ENDIF
-
-save_rdi equ rsp + 24 - LocalVarsSize
-save_rsi equ rsp + 32 - LocalVarsSize
-save_rbx equ rsp + 40 - LocalVarsSize
-save_rbp equ rsp + 48 - LocalVarsSize
-save_r12 equ rsp + 56 - LocalVarsSize
-save_r13 equ rsp + 64 - LocalVarsSize
-;save_r14 equ rsp + 72 - LocalVarsSize
-;save_r15 equ rsp + 80 - LocalVarsSize
-
-
-; summary of register usage
-; scanend ebx
-; scanendw bx
-; chainlenwmask edx
-; curmatch rsi
-; curmatchd esi
-; windowbestlen r8
-; scanalign r9
-; scanalignd r9d
-; window r10
-; bestlen r11
-; bestlend r11d
-; scanstart r12d
-; scanstartw r12w
-; scan r13
-; nicematch r14d
-; limit r15
-; limitd r15d
-; prev rcx
-
-; all the +4 offsets are due to the addition of pending_buf_size (in zlib
-; in the deflate_state structure since the asm code was first written
-; (if you compile with zlib 1.0.4 or older, remove the +4).
-; Note : these value are good with a 8 bytes boundary pack structure
-
-
- MAX_MATCH equ 258
- MIN_MATCH equ 3
- MIN_LOOKAHEAD equ (MAX_MATCH+MIN_MATCH+1)
-
-
-;;; Offsets for fields in the deflate_state structure. These numbers
-;;; are calculated from the definition of deflate_state, with the
-;;; assumption that the compiler will dword-align the fields. (Thus,
-;;; changing the definition of deflate_state could easily cause this
-;;; program to crash horribly, without so much as a warning at
-;;; compile time. Sigh.)
-
-; all the +zlib1222add offsets are due to the addition of fields
-; in zlib in the deflate_state structure since the asm code was first written
-; (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)").
-; (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0").
-; if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8").
-
-
-IFDEF INFOZIP
-
-_DATA SEGMENT
-COMM window_size:DWORD
-; WMask ; 7fff
-COMM window:BYTE:010040H
-COMM prev:WORD:08000H
-; MatchLen : unused
-; PrevMatch : unused
-COMM strstart:DWORD
-COMM match_start:DWORD
-; Lookahead : ignore
-COMM prev_length:DWORD ; PrevLen
-COMM max_chain_length:DWORD
-COMM good_match:DWORD
-COMM nice_match:DWORD
-prev_ad equ OFFSET prev
-window_ad equ OFFSET window
-nicematch equ nice_match
-_DATA ENDS
-WMask equ 07fffh
-
-ELSE
-
- IFNDEF zlib1222add
- zlib1222add equ 8
- ENDIF
-dsWSize equ 56+zlib1222add+(zlib1222add/2)
-dsWMask equ 64+zlib1222add+(zlib1222add/2)
-dsWindow equ 72+zlib1222add
-dsPrev equ 88+zlib1222add
-dsMatchLen equ 128+zlib1222add
-dsPrevMatch equ 132+zlib1222add
-dsStrStart equ 140+zlib1222add
-dsMatchStart equ 144+zlib1222add
-dsLookahead equ 148+zlib1222add
-dsPrevLen equ 152+zlib1222add
-dsMaxChainLen equ 156+zlib1222add
-dsGoodMatch equ 172+zlib1222add
-dsNiceMatch equ 176+zlib1222add
-
-window_size equ [ rcx + dsWSize]
-WMask equ [ rcx + dsWMask]
-window_ad equ [ rcx + dsWindow]
-prev_ad equ [ rcx + dsPrev]
-strstart equ [ rcx + dsStrStart]
-match_start equ [ rcx + dsMatchStart]
-Lookahead equ [ rcx + dsLookahead] ; 0ffffffffh on infozip
-prev_length equ [ rcx + dsPrevLen]
-max_chain_length equ [ rcx + dsMaxChainLen]
-good_match equ [ rcx + dsGoodMatch]
-nice_match equ [ rcx + dsNiceMatch]
-ENDIF
-
-; parameter 1 in r8(deflate state s), param 2 in rdx (cur match)
-
-; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and
-; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp
-;
-; All registers must be preserved across the call, except for
-; rax, rcx, rdx, r8, r9, r10, and r11, which are scratch.
-
-
-
-;;; Save registers that the compiler may be using, and adjust esp to
-;;; make room for our stack frame.
-
-
-;;; Retrieve the function arguments. r8d will hold cur_match
-;;; throughout the entire function. edx will hold the pointer to the
-;;; deflate_state structure during the function's setup (before
-;;; entering the main loop.
-
-; parameter 1 in rcx (deflate_state* s), param 2 in edx -> r8 (cur match)
-
-; this clear high 32 bits of r8, which can be garbage in both r8 and rdx
-
- mov [save_rdi],rdi
- mov [save_rsi],rsi
- mov [save_rbx],rbx
- mov [save_rbp],rbp
-IFDEF INFOZIP
- mov r8d,ecx
-ELSE
- mov r8d,edx
-ENDIF
- mov [save_r12],r12
- mov [save_r13],r13
-; mov [save_r14],r14
-; mov [save_r15],r15
-
-
-;;; uInt wmask = s->w_mask;
-;;; unsigned chain_length = s->max_chain_length;
-;;; if (s->prev_length >= s->good_match) {
-;;; chain_length >>= 2;
-;;; }
-
- mov edi, prev_length
- mov esi, good_match
- mov eax, WMask
- mov ebx, max_chain_length
- cmp edi, esi
- jl LastMatchGood
- shr ebx, 2
-LastMatchGood:
-
-;;; chainlen is decremented once beforehand so that the function can
-;;; use the sign flag instead of the zero flag for the exit test.
-;;; It is then shifted into the high word, to make room for the wmask
-;;; value, which it will always accompany.
-
- dec ebx
- shl ebx, 16
- or ebx, eax
-
-;;; on zlib only
-;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
-
-IFDEF INFOZIP
- mov [chainlenwmask], ebx
-; on infozip nice_match = [nice_match]
-ELSE
- mov eax, nice_match
- mov [chainlenwmask], ebx
- mov r10d, Lookahead
- cmp r10d, eax
- cmovnl r10d, eax
- mov [nicematch],r10d
-ENDIF
-
-;;; register Bytef *scan = s->window + s->strstart;
- mov r10, window_ad
- mov ebp, strstart
- lea r13, [r10 + rbp]
-
-;;; Determine how many bytes the scan ptr is off from being
-;;; dword-aligned.
-
- mov r9,r13
- neg r13
- and r13,3
-
-;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
-;;; s->strstart - (IPos)MAX_DIST(s) : NIL;
-IFDEF INFOZIP
- mov eax,07efah ; MAX_DIST = (WSIZE-MIN_LOOKAHEAD) (0x8000-(3+8+1))
-ELSE
- mov eax, window_size
- sub eax, MIN_LOOKAHEAD
-ENDIF
- xor edi,edi
- sub ebp, eax
-
- mov r11d, prev_length
-
- cmovng ebp,edi
-
-;;; int best_len = s->prev_length;
-
-
-;;; Store the sum of s->window + best_len in esi locally, and in esi.
-
- lea rsi,[r10+r11]
-
-;;; register ush scan_start = *(ushf*)scan;
-;;; register ush scan_end = *(ushf*)(scan+best_len-1);
-;;; Posf *prev = s->prev;
-
- movzx r12d,word ptr [r9]
- movzx ebx, word ptr [r9 + r11 - 1]
-
- mov rdi, prev_ad
-
-;;; Jump into the main loop.
-
- mov edx, [chainlenwmask]
-
- cmp bx,word ptr [rsi + r8 - 1]
- jz LookupLoopIsZero
-
-LookupLoop1:
- and r8d, edx
-
- movzx r8d, word ptr [rdi + r8*2]
- cmp r8d, ebp
- jbe LeaveNow
- sub edx, 00010000h
- js LeaveNow
-
-LoopEntry1:
- cmp bx,word ptr [rsi + r8 - 1]
- jz LookupLoopIsZero
-
-LookupLoop2:
- and r8d, edx
-
- movzx r8d, word ptr [rdi + r8*2]
- cmp r8d, ebp
- jbe LeaveNow
- sub edx, 00010000h
- js LeaveNow
-
-LoopEntry2:
- cmp bx,word ptr [rsi + r8 - 1]
- jz LookupLoopIsZero
-
-LookupLoop4:
- and r8d, edx
-
- movzx r8d, word ptr [rdi + r8*2]
- cmp r8d, ebp
- jbe LeaveNow
- sub edx, 00010000h
- js LeaveNow
-
-LoopEntry4:
-
- cmp bx,word ptr [rsi + r8 - 1]
- jnz LookupLoop1
- jmp LookupLoopIsZero
-
-
-;;; do {
-;;; match = s->window + cur_match;
-;;; if (*(ushf*)(match+best_len-1) != scan_end ||
-;;; *(ushf*)match != scan_start) continue;
-;;; [...]
-;;; } while ((cur_match = prev[cur_match & wmask]) > limit
-;;; && --chain_length != 0);
-;;;
-;;; Here is the inner loop of the function. The function will spend the
-;;; majority of its time in this loop, and majority of that time will
-;;; be spent in the first ten instructions.
-;;;
-;;; Within this loop:
-;;; ebx = scanend
-;;; r8d = curmatch
-;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)
-;;; esi = windowbestlen - i.e., (window + bestlen)
-;;; edi = prev
-;;; ebp = limit
-
-LookupLoop:
- and r8d, edx
-
- movzx r8d, word ptr [rdi + r8*2]
- cmp r8d, ebp
- jbe LeaveNow
- sub edx, 00010000h
- js LeaveNow
-
-LoopEntry:
-
- cmp bx,word ptr [rsi + r8 - 1]
- jnz LookupLoop1
-LookupLoopIsZero:
- cmp r12w, word ptr [r10 + r8]
- jnz LookupLoop1
-
-
-;;; Store the current value of chainlen.
- mov [chainlenwmask], edx
-
-;;; Point edi to the string under scrutiny, and esi to the string we
-;;; are hoping to match it up with. In actuality, esi and edi are
-;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is
-;;; initialized to -(MAX_MATCH_8 - scanalign).
-
- lea rsi,[r8+r10]
- mov rdx, 0fffffffffffffef8h; -(MAX_MATCH_8)
- lea rsi, [rsi + r13 + 0108h] ;MAX_MATCH_8]
- lea rdi, [r9 + r13 + 0108h] ;MAX_MATCH_8]
-
- prefetcht1 [rsi+rdx]
- prefetcht1 [rdi+rdx]
-
-
-;;; Test the strings for equality, 8 bytes at a time. At the end,
-;;; adjust rdx so that it is offset to the exact byte that mismatched.
-;;;
-;;; We already know at this point that the first three bytes of the
-;;; strings match each other, and they can be safely passed over before
-;;; starting the compare loop. So what this code does is skip over 0-3
-;;; bytes, as much as necessary in order to dword-align the edi
-;;; pointer. (rsi will still be misaligned three times out of four.)
-;;;
-;;; It should be confessed that this loop usually does not represent
-;;; much of the total running time. Replacing it with a more
-;;; straightforward "rep cmpsb" would not drastically degrade
-;;; performance.
-
-
-LoopCmps:
- mov rax, [rsi + rdx]
- xor rax, [rdi + rdx]
- jnz LeaveLoopCmps
-
- mov rax, [rsi + rdx + 8]
- xor rax, [rdi + rdx + 8]
- jnz LeaveLoopCmps8
-
-
- mov rax, [rsi + rdx + 8+8]
- xor rax, [rdi + rdx + 8+8]
- jnz LeaveLoopCmps16
-
- add rdx,8+8+8
-
- jnz short LoopCmps
- jmp short LenMaximum
-LeaveLoopCmps16: add rdx,8
-LeaveLoopCmps8: add rdx,8
-LeaveLoopCmps:
-
- test eax, 0000FFFFh
- jnz LenLower
-
- test eax,0ffffffffh
-
- jnz LenLower32
-
- add rdx,4
- shr rax,32
- or ax,ax
- jnz LenLower
-
-LenLower32:
- shr eax,16
- add rdx,2
-LenLower: sub al, 1
- adc rdx, 0
-;;; Calculate the length of the match. If it is longer than MAX_MATCH,
-;;; then automatically accept it as the best possible match and leave.
-
- lea rax, [rdi + rdx]
- sub rax, r9
- cmp eax, MAX_MATCH
- jge LenMaximum
-
-;;; If the length of the match is not longer than the best match we
-;;; have so far, then forget it and return to the lookup loop.
-;///////////////////////////////////
-
- cmp eax, r11d
- jg LongerMatch
-
- lea rsi,[r10+r11]
-
- mov rdi, prev_ad
- mov edx, [chainlenwmask]
- jmp LookupLoop
-
-;;; s->match_start = cur_match;
-;;; best_len = len;
-;;; if (len >= nice_match) break;
-;;; scan_end = *(ushf*)(scan+best_len-1);
-
-LongerMatch:
- mov r11d, eax
- mov match_start, r8d
- cmp eax, [nicematch]
- jge LeaveNow
-
- lea rsi,[r10+rax]
-
- movzx ebx, word ptr [r9 + rax - 1]
- mov rdi, prev_ad
- mov edx, [chainlenwmask]
- jmp LookupLoop
-
-;;; Accept the current string, with the maximum possible length.
-
-LenMaximum:
- mov r11d,MAX_MATCH
- mov match_start, r8d
-
-;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
-;;; return s->lookahead;
-
-LeaveNow:
-IFDEF INFOZIP
- mov eax,r11d
-ELSE
- mov eax, Lookahead
- cmp r11d, eax
- cmovng eax, r11d
-ENDIF
-
-;;; Restore the stack and return from whence we came.
-
-
- mov rsi,[save_rsi]
- mov rdi,[save_rdi]
- mov rbx,[save_rbx]
- mov rbp,[save_rbp]
- mov r12,[save_r12]
- mov r13,[save_r13]
-; mov r14,[save_r14]
-; mov r15,[save_r15]
-
-
- ret 0
-; please don't remove this string !
-; Your can freely use gvmat64 in any free or commercial app
-; but it is far better don't remove the string in the binary!
- db 0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998, converted to amd 64 by Gilles Vollant 2005",0dh,0ah,0
-longest_match ENDP
-
-match_init PROC
- ret 0
-match_init ENDP
-
-
-END
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/masmx64/inffas8664.c
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/masmx64/inffas8664.c b/c++/libs/zlib-1.2.8/contrib/masmx64/inffas8664.c
deleted file mode 100644
index aa861a3..0000000
--- a/c++/libs/zlib-1.2.8/contrib/masmx64/inffas8664.c
+++ /dev/null
@@ -1,186 +0,0 @@
-/* inffas8664.c is a hand tuned assembler version of inffast.c - fast decoding
- * version for AMD64 on Windows using Microsoft C compiler
- *
- * Copyright (C) 1995-2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- *
- * Copyright (C) 2003 Chris Anderson <ch...@charm.net>
- * Please use the copyright conditions above.
- *
- * 2005 - Adaptation to Microsoft C Compiler for AMD64 by Gilles Vollant
- *
- * inffas8664.c call function inffas8664fnc in inffasx64.asm
- * inffasx64.asm is automatically convert from AMD64 portion of inffas86.c
- *
- * Dec-29-2003 -- I added AMD64 inflate asm support. This version is also
- * slightly quicker on x86 systems because, instead of using rep movsb to copy
- * data, it uses rep movsw, which moves data in 2-byte chunks instead of single
- * bytes. I've tested the AMD64 code on a Fedora Core 1 + the x86_64 updates
- * from http://fedora.linux.duke.edu/fc1_x86_64
- * which is running on an Athlon 64 3000+ / Gigabyte GA-K8VT800M system with
- * 1GB ram. The 64-bit version is about 4% faster than the 32-bit version,
- * when decompressing mozilla-source-1.3.tar.gz.
- *
- * Mar-13-2003 -- Most of this is derived from inffast.S which is derived from
- * the gcc -S output of zlib-1.2.0/inffast.c. Zlib-1.2.0 is in beta release at
- * the moment. I have successfully compiled and tested this code with gcc2.96,
- * gcc3.2, icc5.0, msvc6.0. It is very close to the speed of inffast.S
- * compiled with gcc -DNO_MMX, but inffast.S is still faster on the P3 with MMX
- * enabled. I will attempt to merge the MMX code into this version. Newer
- * versions of this and inffast.S can be found at
- * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/
- *
- */
-
-#include <stdio.h>
-#include "zutil.h"
-#include "inftrees.h"
-#include "inflate.h"
-#include "inffast.h"
-
-/* Mark Adler's comments from inffast.c: */
-
-/*
- Decode literal, length, and distance codes and write out the resulting
- literal and match bytes until either not enough input or output is
- available, an end-of-block is encountered, or a data error is encountered.
- When large enough input and output buffers are supplied to inflate(), for
- example, a 16K input buffer and a 64K output buffer, more than 95% of the
- inflate execution time is spent in this routine.
-
- Entry assumptions:
-
- state->mode == LEN
- strm->avail_in >= 6
- strm->avail_out >= 258
- start >= strm->avail_out
- state->bits < 8
-
- On return, state->mode is one of:
-
- LEN -- ran out of enough output space or enough available input
- TYPE -- reached end of block code, inflate() to interpret next block
- BAD -- error in block data
-
- Notes:
-
- - The maximum input bits used by a length/distance pair is 15 bits for the
- length code, 5 bits for the length extra, 15 bits for the distance code,
- and 13 bits for the distance extra. This totals 48 bits, or six bytes.
- Therefore if strm->avail_in >= 6, then there is enough input to avoid
- checking for available input while decoding.
-
- - The maximum bytes that a single length/distance pair can output is 258
- bytes, which is the maximum length that can be coded. inflate_fast()
- requires strm->avail_out >= 258 for each loop to avoid checking for
- output space.
- */
-
-
-
- typedef struct inffast_ar {
-/* 64 32 x86 x86_64 */
-/* ar offset register */
-/* 0 0 */ void *esp; /* esp save */
-/* 8 4 */ void *ebp; /* ebp save */
-/* 16 8 */ unsigned char FAR *in; /* esi rsi local strm->next_in */
-/* 24 12 */ unsigned char FAR *last; /* r9 while in < last */
-/* 32 16 */ unsigned char FAR *out; /* edi rdi local strm->next_out */
-/* 40 20 */ unsigned char FAR *beg; /* inflate()'s init next_out */
-/* 48 24 */ unsigned char FAR *end; /* r10 while out < end */
-/* 56 28 */ unsigned char FAR *window;/* size of window, wsize!=0 */
-/* 64 32 */ code const FAR *lcode; /* ebp rbp local strm->lencode */
-/* 72 36 */ code const FAR *dcode; /* r11 local strm->distcode */
-/* 80 40 */ size_t /*unsigned long */hold; /* edx rdx local strm->hold */
-/* 88 44 */ unsigned bits; /* ebx rbx local strm->bits */
-/* 92 48 */ unsigned wsize; /* window size */
-/* 96 52 */ unsigned write; /* window write index */
-/*100 56 */ unsigned lmask; /* r12 mask for lcode */
-/*104 60 */ unsigned dmask; /* r13 mask for dcode */
-/*108 64 */ unsigned len; /* r14 match length */
-/*112 68 */ unsigned dist; /* r15 match distance */
-/*116 72 */ unsigned status; /* set when state chng*/
- } type_ar;
-#ifdef ASMINF
-
-void inflate_fast(strm, start)
-z_streamp strm;
-unsigned start; /* inflate()'s starting value for strm->avail_out */
-{
- struct inflate_state FAR *state;
- type_ar ar;
- void inffas8664fnc(struct inffast_ar * par);
-
-
-
-#if (defined( __GNUC__ ) && defined( __amd64__ ) && ! defined( __i386 )) || (defined(_MSC_VER) && defined(_M_AMD64))
-#define PAD_AVAIL_IN 6
-#define PAD_AVAIL_OUT 258
-#else
-#define PAD_AVAIL_IN 5
-#define PAD_AVAIL_OUT 257
-#endif
-
- /* copy state to local variables */
- state = (struct inflate_state FAR *)strm->state;
-
- ar.in = strm->next_in;
- ar.last = ar.in + (strm->avail_in - PAD_AVAIL_IN);
- ar.out = strm->next_out;
- ar.beg = ar.out - (start - strm->avail_out);
- ar.end = ar.out + (strm->avail_out - PAD_AVAIL_OUT);
- ar.wsize = state->wsize;
- ar.write = state->wnext;
- ar.window = state->window;
- ar.hold = state->hold;
- ar.bits = state->bits;
- ar.lcode = state->lencode;
- ar.dcode = state->distcode;
- ar.lmask = (1U << state->lenbits) - 1;
- ar.dmask = (1U << state->distbits) - 1;
-
- /* decode literals and length/distances until end-of-block or not enough
- input data or output space */
-
- /* align in on 1/2 hold size boundary */
- while (((size_t)(void *)ar.in & (sizeof(ar.hold) / 2 - 1)) != 0) {
- ar.hold += (unsigned long)*ar.in++ << ar.bits;
- ar.bits += 8;
- }
-
- inffas8664fnc(&ar);
-
- if (ar.status > 1) {
- if (ar.status == 2)
- strm->msg = "invalid literal/length code";
- else if (ar.status == 3)
- strm->msg = "invalid distance code";
- else
- strm->msg = "invalid distance too far back";
- state->mode = BAD;
- }
- else if ( ar.status == 1 ) {
- state->mode = TYPE;
- }
-
- /* return unused bytes (on entry, bits < 8, so in won't go too far back) */
- ar.len = ar.bits >> 3;
- ar.in -= ar.len;
- ar.bits -= ar.len << 3;
- ar.hold &= (1U << ar.bits) - 1;
-
- /* update state and return */
- strm->next_in = ar.in;
- strm->next_out = ar.out;
- strm->avail_in = (unsigned)(ar.in < ar.last ?
- PAD_AVAIL_IN + (ar.last - ar.in) :
- PAD_AVAIL_IN - (ar.in - ar.last));
- strm->avail_out = (unsigned)(ar.out < ar.end ?
- PAD_AVAIL_OUT + (ar.end - ar.out) :
- PAD_AVAIL_OUT - (ar.out - ar.end));
- state->hold = (unsigned long)ar.hold;
- state->bits = ar.bits;
- return;
-}
-
-#endif
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/zlib-1.2.8/contrib/masmx64/inffasx64.asm
----------------------------------------------------------------------
diff --git a/c++/libs/zlib-1.2.8/contrib/masmx64/inffasx64.asm b/c++/libs/zlib-1.2.8/contrib/masmx64/inffasx64.asm
deleted file mode 100644
index 41ec823..0000000
--- a/c++/libs/zlib-1.2.8/contrib/masmx64/inffasx64.asm
+++ /dev/null
@@ -1,396 +0,0 @@
-; inffasx64.asm is a hand tuned assembler version of inffast.c - fast decoding
-; version for AMD64 on Windows using Microsoft C compiler
-;
-; inffasx64.asm is automatically convert from AMD64 portion of inffas86.c
-; inffasx64.asm is called by inffas8664.c, which contain more info.
-
-
-; to compile this file, I use option
-; ml64.exe /Flinffasx64 /c /Zi inffasx64.asm
-; with Microsoft Macro Assembler (x64) for AMD64
-;
-
-; This file compile with Microsoft Macro Assembler (x64) for AMD64
-;
-; ml64.exe is given with Visual Studio 2005/2008/2010 and Windows WDK
-;
-; (you can get Windows WDK with ml64 for AMD64 from
-; http://www.microsoft.com/whdc/Devtools/wdk/default.mspx for low price)
-;
-
-
-.code
-inffas8664fnc PROC
-
-; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and
-; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp
-;
-; All registers must be preserved across the call, except for
-; rax, rcx, rdx, r8, r-9, r10, and r11, which are scratch.
-
-
- mov [rsp-8],rsi
- mov [rsp-16],rdi
- mov [rsp-24],r12
- mov [rsp-32],r13
- mov [rsp-40],r14
- mov [rsp-48],r15
- mov [rsp-56],rbx
-
- mov rax,rcx
-
- mov [rax+8], rbp ; /* save regs rbp and rsp */
- mov [rax], rsp
-
- mov rsp, rax ; /* make rsp point to &ar */
-
- mov rsi, [rsp+16] ; /* rsi = in */
- mov rdi, [rsp+32] ; /* rdi = out */
- mov r9, [rsp+24] ; /* r9 = last */
- mov r10, [rsp+48] ; /* r10 = end */
- mov rbp, [rsp+64] ; /* rbp = lcode */
- mov r11, [rsp+72] ; /* r11 = dcode */
- mov rdx, [rsp+80] ; /* rdx = hold */
- mov ebx, [rsp+88] ; /* ebx = bits */
- mov r12d, [rsp+100] ; /* r12d = lmask */
- mov r13d, [rsp+104] ; /* r13d = dmask */
- ; /* r14d = len */
- ; /* r15d = dist */
-
-
- cld
- cmp r10, rdi
- je L_one_time ; /* if only one decode left */
- cmp r9, rsi
-
- jne L_do_loop
-
-
-L_one_time:
- mov r8, r12 ; /* r8 = lmask */
- cmp bl, 32
- ja L_get_length_code_one_time
-
- lodsd ; /* eax = *(uint *)in++ */
- mov cl, bl ; /* cl = bits, needs it for shifting */
- add bl, 32 ; /* bits += 32 */
- shl rax, cl
- or rdx, rax ; /* hold |= *((uint *)in)++ << bits */
- jmp L_get_length_code_one_time
-
-ALIGN 4
-L_while_test:
- cmp r10, rdi
- jbe L_break_loop
- cmp r9, rsi
- jbe L_break_loop
-
-L_do_loop:
- mov r8, r12 ; /* r8 = lmask */
- cmp bl, 32
- ja L_get_length_code ; /* if (32 < bits) */
-
- lodsd ; /* eax = *(uint *)in++ */
- mov cl, bl ; /* cl = bits, needs it for shifting */
- add bl, 32 ; /* bits += 32 */
- shl rax, cl
- or rdx, rax ; /* hold |= *((uint *)in)++ << bits */
-
-L_get_length_code:
- and r8, rdx ; /* r8 &= hold */
- mov eax, [rbp+r8*4] ; /* eax = lcode[hold & lmask] */
-
- mov cl, ah ; /* cl = this.bits */
- sub bl, ah ; /* bits -= this.bits */
- shr rdx, cl ; /* hold >>= this.bits */
-
- test al, al
- jnz L_test_for_length_base ; /* if (op != 0) 45.7% */
-
- mov r8, r12 ; /* r8 = lmask */
- shr eax, 16 ; /* output this.val char */
- stosb
-
-L_get_length_code_one_time:
- and r8, rdx ; /* r8 &= hold */
- mov eax, [rbp+r8*4] ; /* eax = lcode[hold & lmask] */
-
-L_dolen:
- mov cl, ah ; /* cl = this.bits */
- sub bl, ah ; /* bits -= this.bits */
- shr rdx, cl ; /* hold >>= this.bits */
-
- test al, al
- jnz L_test_for_length_base ; /* if (op != 0) 45.7% */
-
- shr eax, 16 ; /* output this.val char */
- stosb
- jmp L_while_test
-
-ALIGN 4
-L_test_for_length_base:
- mov r14d, eax ; /* len = this */
- shr r14d, 16 ; /* len = this.val */
- mov cl, al
-
- test al, 16
- jz L_test_for_second_level_length ; /* if ((op & 16) == 0) 8% */
- and cl, 15 ; /* op &= 15 */
- jz L_decode_distance ; /* if (!op) */
-
-L_add_bits_to_len:
- sub bl, cl
- xor eax, eax
- inc eax
- shl eax, cl
- dec eax
- and eax, edx ; /* eax &= hold */
- shr rdx, cl
- add r14d, eax ; /* len += hold & mask[op] */
-
-L_decode_distance:
- mov r8, r13 ; /* r8 = dmask */
- cmp bl, 32
- ja L_get_distance_code ; /* if (32 < bits) */
-
- lodsd ; /* eax = *(uint *)in++ */
- mov cl, bl ; /* cl = bits, needs it for shifting */
- add bl, 32 ; /* bits += 32 */
- shl rax, cl
- or rdx, rax ; /* hold |= *((uint *)in)++ << bits */
-
-L_get_distance_code:
- and r8, rdx ; /* r8 &= hold */
- mov eax, [r11+r8*4] ; /* eax = dcode[hold & dmask] */
-
-L_dodist:
- mov r15d, eax ; /* dist = this */
- shr r15d, 16 ; /* dist = this.val */
- mov cl, ah
- sub bl, ah ; /* bits -= this.bits */
- shr rdx, cl ; /* hold >>= this.bits */
- mov cl, al ; /* cl = this.op */
-
- test al, 16 ; /* if ((op & 16) == 0) */
- jz L_test_for_second_level_dist
- and cl, 15 ; /* op &= 15 */
- jz L_check_dist_one
-
-L_add_bits_to_dist:
- sub bl, cl
- xor eax, eax
- inc eax
- shl eax, cl
- dec eax ; /* (1 << op) - 1 */
- and eax, edx ; /* eax &= hold */
- shr rdx, cl
- add r15d, eax ; /* dist += hold & ((1 << op) - 1) */
-
-L_check_window:
- mov r8, rsi ; /* save in so from can use it's reg */
- mov rax, rdi
- sub rax, [rsp+40] ; /* nbytes = out - beg */
-
- cmp eax, r15d
- jb L_clip_window ; /* if (dist > nbytes) 4.2% */
-
- mov ecx, r14d ; /* ecx = len */
- mov rsi, rdi
- sub rsi, r15 ; /* from = out - dist */
-
- sar ecx, 1
- jnc L_copy_two ; /* if len % 2 == 0 */
-
- rep movsw
- mov al, [rsi]
- mov [rdi], al
- inc rdi
-
- mov rsi, r8 ; /* move in back to %rsi, toss from */
- jmp L_while_test
-
-L_copy_two:
- rep movsw
- mov rsi, r8 ; /* move in back to %rsi, toss from */
- jmp L_while_test
-
-ALIGN 4
-L_check_dist_one:
- cmp r15d, 1 ; /* if dist 1, is a memset */
- jne L_check_window
- cmp [rsp+40], rdi ; /* if out == beg, outside window */
- je L_check_window
-
- mov ecx, r14d ; /* ecx = len */
- mov al, [rdi-1]
- mov ah, al
-
- sar ecx, 1
- jnc L_set_two
- mov [rdi], al
- inc rdi
-
-L_set_two:
- rep stosw
- jmp L_while_test
-
-ALIGN 4
-L_test_for_second_level_length:
- test al, 64
- jnz L_test_for_end_of_block ; /* if ((op & 64) != 0) */
-
- xor eax, eax
- inc eax
- shl eax, cl
- dec eax
- and eax, edx ; /* eax &= hold */
- add eax, r14d ; /* eax += len */
- mov eax, [rbp+rax*4] ; /* eax = lcode[val+(hold&mask[op])]*/
- jmp L_dolen
-
-ALIGN 4
-L_test_for_second_level_dist:
- test al, 64
- jnz L_invalid_distance_code ; /* if ((op & 64) != 0) */
-
- xor eax, eax
- inc eax
- shl eax, cl
- dec eax
- and eax, edx ; /* eax &= hold */
- add eax, r15d ; /* eax += dist */
- mov eax, [r11+rax*4] ; /* eax = dcode[val+(hold&mask[op])]*/
- jmp L_dodist
-
-ALIGN 4
-L_clip_window:
- mov ecx, eax ; /* ecx = nbytes */
- mov eax, [rsp+92] ; /* eax = wsize, prepare for dist cmp */
- neg ecx ; /* nbytes = -nbytes */
-
- cmp eax, r15d
- jb L_invalid_distance_too_far ; /* if (dist > wsize) */
-
- add ecx, r15d ; /* nbytes = dist - nbytes */
- cmp dword ptr [rsp+96], 0
- jne L_wrap_around_window ; /* if (write != 0) */
-
- mov rsi, [rsp+56] ; /* from = window */
- sub eax, ecx ; /* eax -= nbytes */
- add rsi, rax ; /* from += wsize - nbytes */
-
- mov eax, r14d ; /* eax = len */
- cmp r14d, ecx
- jbe L_do_copy ; /* if (nbytes >= len) */
-
- sub eax, ecx ; /* eax -= nbytes */
- rep movsb
- mov rsi, rdi
- sub rsi, r15 ; /* from = &out[ -dist ] */
- jmp L_do_copy
-
-ALIGN 4
-L_wrap_around_window:
- mov eax, [rsp+96] ; /* eax = write */
- cmp ecx, eax
- jbe L_contiguous_in_window ; /* if (write >= nbytes) */
-
- mov esi, [rsp+92] ; /* from = wsize */
- add rsi, [rsp+56] ; /* from += window */
- add rsi, rax ; /* from += write */
- sub rsi, rcx ; /* from -= nbytes */
- sub ecx, eax ; /* nbytes -= write */
-
- mov eax, r14d ; /* eax = len */
- cmp eax, ecx
- jbe L_do_copy ; /* if (nbytes >= len) */
-
- sub eax, ecx ; /* len -= nbytes */
- rep movsb
- mov rsi, [rsp+56] ; /* from = window */
- mov ecx, [rsp+96] ; /* nbytes = write */
- cmp eax, ecx
- jbe L_do_copy ; /* if (nbytes >= len) */
-
- sub eax, ecx ; /* len -= nbytes */
- rep movsb
- mov rsi, rdi
- sub rsi, r15 ; /* from = out - dist */
- jmp L_do_copy
-
-ALIGN 4
-L_contiguous_in_window:
- mov rsi, [rsp+56] ; /* rsi = window */
- add rsi, rax
- sub rsi, rcx ; /* from += write - nbytes */
-
- mov eax, r14d ; /* eax = len */
- cmp eax, ecx
- jbe L_do_copy ; /* if (nbytes >= len) */
-
- sub eax, ecx ; /* len -= nbytes */
- rep movsb
- mov rsi, rdi
- sub rsi, r15 ; /* from = out - dist */
- jmp L_do_copy ; /* if (nbytes >= len) */
-
-ALIGN 4
-L_do_copy:
- mov ecx, eax ; /* ecx = len */
- rep movsb
-
- mov rsi, r8 ; /* move in back to %esi, toss from */
- jmp L_while_test
-
-L_test_for_end_of_block:
- test al, 32
- jz L_invalid_literal_length_code
- mov dword ptr [rsp+116], 1
- jmp L_break_loop_with_status
-
-L_invalid_literal_length_code:
- mov dword ptr [rsp+116], 2
- jmp L_break_loop_with_status
-
-L_invalid_distance_code:
- mov dword ptr [rsp+116], 3
- jmp L_break_loop_with_status
-
-L_invalid_distance_too_far:
- mov dword ptr [rsp+116], 4
- jmp L_break_loop_with_status
-
-L_break_loop:
- mov dword ptr [rsp+116], 0
-
-L_break_loop_with_status:
-; /* put in, out, bits, and hold back into ar and pop esp */
- mov [rsp+16], rsi ; /* in */
- mov [rsp+32], rdi ; /* out */
- mov [rsp+88], ebx ; /* bits */
- mov [rsp+80], rdx ; /* hold */
-
- mov rax, [rsp] ; /* restore rbp and rsp */
- mov rbp, [rsp+8]
- mov rsp, rax
-
-
-
- mov rsi,[rsp-8]
- mov rdi,[rsp-16]
- mov r12,[rsp-24]
- mov r13,[rsp-32]
- mov r14,[rsp-40]
- mov r15,[rsp-48]
- mov rbx,[rsp-56]
-
- ret 0
-; :
-; : "m" (ar)
-; : "memory", "%rax", "%rbx", "%rcx", "%rdx", "%rsi", "%rdi",
-; "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15"
-; );
-
-inffas8664fnc ENDP
-;_TEXT ENDS
-END
[35/51] [partial] orc git commit: ORC-204 Update and use CMake
External Project to build C++ compression libraries.
Posted by om...@apache.org.
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/snappy-1.1.2/testdata/alice29.txt
----------------------------------------------------------------------
diff --git a/c++/libs/snappy-1.1.2/testdata/alice29.txt b/c++/libs/snappy-1.1.2/testdata/alice29.txt
deleted file mode 100644
index 7033655..0000000
--- a/c++/libs/snappy-1.1.2/testdata/alice29.txt
+++ /dev/null
@@ -1,3609 +0,0 @@
-
-
-
-
- ALICE'S ADVENTURES IN WONDERLAND
-
- Lewis Carroll
-
- THE MILLENNIUM FULCRUM EDITION 2.9
-
-
-
-
- CHAPTER I
-
- Down the Rabbit-Hole
-
-
- Alice was beginning to get very tired of sitting by her sister
-on the bank, and of having nothing to do: once or twice she had
-peeped into the book her sister was reading, but it had no
-pictures or conversations in it, `and what is the use of a book,'
-thought Alice `without pictures or conversation?'
-
- So she was considering in her own mind (as well as she could,
-for the hot day made her feel very sleepy and stupid), whether
-the pleasure of making a daisy-chain would be worth the trouble
-of getting up and picking the daisies, when suddenly a White
-Rabbit with pink eyes ran close by her.
-
- There was nothing so VERY remarkable in that; nor did Alice
-think it so VERY much out of the way to hear the Rabbit say to
-itself, `Oh dear! Oh dear! I shall be late!' (when she thought
-it over afterwards, it occurred to her that she ought to have
-wondered at this, but at the time it all seemed quite natural);
-but when the Rabbit actually TOOK A WATCH OUT OF ITS WAISTCOAT-
-POCKET, and looked at it, and then hurried on, Alice started to
-her feet, for it flashed across her mind that she had never
-before seen a rabbit with either a waistcoat-pocket, or a watch to
-take out of it, and burning with curiosity, she ran across the
-field after it, and fortunately was just in time to see it pop
-down a large rabbit-hole under the hedge.
-
- In another moment down went Alice after it, never once
-considering how in the world she was to get out again.
-
- The rabbit-hole went straight on like a tunnel for some way,
-and then dipped suddenly down, so suddenly that Alice had not a
-moment to think about stopping herself before she found herself
-falling down a very deep well.
-
- Either the well was very deep, or she fell very slowly, for she
-had plenty of time as she went down to look about her and to
-wonder what was going to happen next. First, she tried to look
-down and make out what she was coming to, but it was too dark to
-see anything; then she looked at the sides of the well, and
-noticed that they were filled with cupboards and book-shelves;
-here and there she saw maps and pictures hung upon pegs. She
-took down a jar from one of the shelves as she passed; it was
-labelled `ORANGE MARMALADE', but to her great disappointment it
-was empty: she did not like to drop the jar for fear of killing
-somebody, so managed to put it into one of the cupboards as she
-fell past it.
-
- `Well!' thought Alice to herself, `after such a fall as this, I
-shall think nothing of tumbling down stairs! How brave they'll
-all think me at home! Why, I wouldn't say anything about it,
-even if I fell off the top of the house!' (Which was very likely
-true.)
-
- Down, down, down. Would the fall NEVER come to an end! `I
-wonder how many miles I've fallen by this time?' she said aloud.
-`I must be getting somewhere near the centre of the earth. Let
-me see: that would be four thousand miles down, I think--' (for,
-you see, Alice had learnt several things of this sort in her
-lessons in the schoolroom, and though this was not a VERY good
-opportunity for showing off her knowledge, as there was no one to
-listen to her, still it was good practice to say it over) `--yes,
-that's about the right distance--but then I wonder what Latitude
-or Longitude I've got to?' (Alice had no idea what Latitude was,
-or Longitude either, but thought they were nice grand words to
-say.)
-
- Presently she began again. `I wonder if I shall fall right
-THROUGH the earth! How funny it'll seem to come out among the
-people that walk with their heads downward! The Antipathies, I
-think--' (she was rather glad there WAS no one listening, this
-time, as it didn't sound at all the right word) `--but I shall
-have to ask them what the name of the country is, you know.
-Please, Ma'am, is this New Zealand or Australia?' (and she tried
-to curtsey as she spoke--fancy CURTSEYING as you're falling
-through the air! Do you think you could manage it?) `And what
-an ignorant little girl she'll think me for asking! No, it'll
-never do to ask: perhaps I shall see it written up somewhere.'
-
- Down, down, down. There was nothing else to do, so Alice soon
-began talking again. `Dinah'll miss me very much to-night, I
-should think!' (Dinah was the cat.) `I hope they'll remember
-her saucer of milk at tea-time. Dinah my dear! I wish you were
-down here with me! There are no mice in the air, I'm afraid, but
-you might catch a bat, and that's very like a mouse, you know.
-But do cats eat bats, I wonder?' And here Alice began to get
-rather sleepy, and went on saying to herself, in a dreamy sort of
-way, `Do cats eat bats? Do cats eat bats?' and sometimes, `Do
-bats eat cats?' for, you see, as she couldn't answer either
-question, it didn't much matter which way she put it. She felt
-that she was dozing off, and had just begun to dream that she
-was walking hand in hand with Dinah, and saying to her very
-earnestly, `Now, Dinah, tell me the truth: did you ever eat a
-bat?' when suddenly, thump! thump! down she came upon a heap of
-sticks and dry leaves, and the fall was over.
-
- Alice was not a bit hurt, and she jumped up on to her feet in a
-moment: she looked up, but it was all dark overhead; before her
-was another long passage, and the White Rabbit was still in
-sight, hurrying down it. There was not a moment to be lost:
-away went Alice like the wind, and was just in time to hear it
-say, as it turned a corner, `Oh my ears and whiskers, how late
-it's getting!' She was close behind it when she turned the
-corner, but the Rabbit was no longer to be seen: she found
-herself in a long, low hall, which was lit up by a row of lamps
-hanging from the roof.
-
- There were doors all round the hall, but they were all locked;
-and when Alice had been all the way down one side and up the
-other, trying every door, she walked sadly down the middle,
-wondering how she was ever to get out again.
-
- Suddenly she came upon a little three-legged table, all made of
-solid glass; there was nothing on it except a tiny golden key,
-and Alice's first thought was that it might belong to one of the
-doors of the hall; but, alas! either the locks were too large, or
-the key was too small, but at any rate it would not open any of
-them. However, on the second time round, she came upon a low
-curtain she had not noticed before, and behind it was a little
-door about fifteen inches high: she tried the little golden key
-in the lock, and to her great delight it fitted!
-
- Alice opened the door and found that it led into a small
-passage, not much larger than a rat-hole: she knelt down and
-looked along the passage into the loveliest garden you ever saw.
-How she longed to get out of that dark hall, and wander about
-among those beds of bright flowers and those cool fountains, but
-she could not even get her head though the doorway; `and even if
-my head would go through,' thought poor Alice, `it would be of
-very little use without my shoulders. Oh, how I wish
-I could shut up like a telescope! I think I could, if I only
-know how to begin.' For, you see, so many out-of-the-way things
-had happened lately, that Alice had begun to think that very few
-things indeed were really impossible.
-
- There seemed to be no use in waiting by the little door, so she
-went back to the table, half hoping she might find another key on
-it, or at any rate a book of rules for shutting people up like
-telescopes: this time she found a little bottle on it, (`which
-certainly was not here before,' said Alice,) and round the neck
-of the bottle was a paper label, with the words `DRINK ME'
-beautifully printed on it in large letters.
-
- It was all very well to say `Drink me,' but the wise little
-Alice was not going to do THAT in a hurry. `No, I'll look
-first,' she said, `and see whether it's marked "poison" or not';
-for she had read several nice little histories about children who
-had got burnt, and eaten up by wild beasts and other unpleasant
-things, all because they WOULD not remember the simple rules
-their friends had taught them: such as, that a red-hot poker
-will burn you if you hold it too long; and that if you cut your
-finger VERY deeply with a knife, it usually bleeds; and she had
-never forgotten that, if you drink much from a bottle marked
-`poison,' it is almost certain to disagree with you, sooner or
-later.
-
- However, this bottle was NOT marked `poison,' so Alice ventured
-to taste it, and finding it very nice, (it had, in fact, a sort
-of mixed flavour of cherry-tart, custard, pine-apple, roast
-turkey, toffee, and hot buttered toast,) she very soon finished
-it off.
-
- * * * * * * *
-
- * * * * * *
-
- * * * * * * *
-
- `What a curious feeling!' said Alice; `I must be shutting up
-like a telescope.'
-
- And so it was indeed: she was now only ten inches high, and
-her face brightened up at the thought that she was now the right
-size for going though the little door into that lovely garden.
-First, however, she waited for a few minutes to see if she was
-going to shrink any further: she felt a little nervous about
-this; `for it might end, you know,' said Alice to herself, `in my
-going out altogether, like a candle. I wonder what I should be
-like then?' And she tried to fancy what the flame of a candle is
-like after the candle is blown out, for she could not remember
-ever having seen such a thing.
-
- After a while, finding that nothing more happened, she decided
-on going into the garden at once; but, alas for poor Alice! when
-she got to the door, she found he had forgotten the little golden
-key, and when she went back to the table for it, she found she
-could not possibly reach it: she could see it quite plainly
-through the glass, and she tried her best to climb up one of the
-legs of the table, but it was too slippery; and when she had
-tired herself out with trying, the poor little thing sat down and
-cried.
-
- `Come, there's no use in crying like that!' said Alice to
-herself, rather sharply; `I advise you to leave off this minute!'
-She generally gave herself very good advice, (though she very
-seldom followed it), and sometimes she scolded herself so
-severely as to bring tears into her eyes; and once she remembered
-trying to box her own ears for having cheated herself in a game
-of croquet she was playing against herself, for this curious
-child was very fond of pretending to be two people. `But it's no
-use now,' thought poor Alice, `to pretend to be two people! Why,
-there's hardly enough of me left to make ONE respectable
-person!'
-
- Soon her eye fell on a little glass box that was lying under
-the table: she opened it, and found in it a very small cake, on
-which the words `EAT ME' were beautifully marked in currants.
-`Well, I'll eat it,' said Alice, `and if it makes me grow larger,
-I can reach the key; and if it makes me grow smaller, I can creep
-under the door; so either way I'll get into the garden, and I
-don't care which happens!'
-
- She ate a little bit, and said anxiously to herself, `Which
-way? Which way?', holding her hand on the top of her head to
-feel which way it was growing, and she was quite surprised to
-find that she remained the same size: to be sure, this generally
-happens when one eats cake, but Alice had got so much into the
-way of expecting nothing but out-of-the-way things to happen,
-that it seemed quite dull and stupid for life to go on in the
-common way.
-
- So she set to work, and very soon finished off the cake.
-
- * * * * * * *
-
- * * * * * *
-
- * * * * * * *
-
-
-
-
- CHAPTER II
-
- The Pool of Tears
-
-
- `Curiouser and curiouser!' cried Alice (she was so much
-surprised, that for the moment she quite forgot how to speak good
-English); `now I'm opening out like the largest telescope that
-ever was! Good-bye, feet!' (for when she looked down at her
-feet, they seemed to be almost out of sight, they were getting so
-far off). `Oh, my poor little feet, I wonder who will put on
-your shoes and stockings for you now, dears? I'm sure _I_ shan't
-be able! I shall be a great deal too far off to trouble myself
-about you: you must manage the best way you can; --but I must be
-kind to them,' thought Alice, `or perhaps they won't walk the
-way I want to go! Let me see: I'll give them a new pair of
-boots every Christmas.'
-
- And she went on planning to herself how she would manage it.
-`They must go by the carrier,' she thought; `and how funny it'll
-seem, sending presents to one's own feet! And how odd the
-directions will look!
-
- ALICE'S RIGHT FOOT, ESQ.
- HEARTHRUG,
- NEAR THE FENDER,
- (WITH ALICE'S LOVE).
-
-Oh dear, what nonsense I'm talking!'
-
- Just then her head struck against the roof of the hall: in
-fact she was now more than nine feet high, and she at once took
-up the little golden key and hurried off to the garden door.
-
- Poor Alice! It was as much as she could do, lying down on one
-side, to look through into the garden with one eye; but to get
-through was more hopeless than ever: she sat down and began to
-cry again.
-
- `You ought to be ashamed of yourself,' said Alice, `a great
-girl like you,' (she might well say this), `to go on crying in
-this way! Stop this moment, I tell you!' But she went on all
-the same, shedding gallons of tears, until there was a large pool
-all round her, about four inches deep and reaching half down the
-hall.
-
- After a time she heard a little pattering of feet in the
-distance, and she hastily dried her eyes to see what was coming.
-It was the White Rabbit returning, splendidly dressed, with a
-pair of white kid gloves in one hand and a large fan in the
-other: he came trotting along in a great hurry, muttering to
-himself as he came, `Oh! the Duchess, the Duchess! Oh! won't she
-be savage if I've kept her waiting!' Alice felt so desperate
-that she was ready to ask help of any one; so, when the Rabbit
-came near her, she began, in a low, timid voice, `If you please,
-sir--' The Rabbit started violently, dropped the white kid
-gloves and the fan, and skurried away into the darkness as hard
-as he could go.
-
- Alice took up the fan and gloves, and, as the hall was very
-hot, she kept fanning herself all the time she went on talking:
-`Dear, dear! How queer everything is to-day! And yesterday
-things went on just as usual. I wonder if I've been changed in
-the night? Let me think: was I the same when I got up this
-morning? I almost think I can remember feeling a little
-different. But if I'm not the same, the next question is, Who in
-the world am I? Ah, THAT'S the great puzzle!' And she began
-thinking over all the children she knew that were of the same age
-as herself, to see if she could have been changed for any of
-them.
-
- `I'm sure I'm not Ada,' she said, `for her hair goes in such
-long ringlets, and mine doesn't go in ringlets at all; and I'm
-sure I can't be Mabel, for I know all sorts of things, and she,
-oh! she knows such a very little! Besides, SHE'S she, and I'm I,
-and--oh dear, how puzzling it all is! I'll try if I know all the
-things I used to know. Let me see: four times five is twelve,
-and four times six is thirteen, and four times seven is--oh dear!
-I shall never get to twenty at that rate! However, the
-Multiplication Table doesn't signify: let's try Geography.
-London is the capital of Paris, and Paris is the capital of Rome,
-and Rome--no, THAT'S all wrong, I'm certain! I must have been
-changed for Mabel! I'll try and say "How doth the little--"'
-and she crossed her hands on her lap as if she were saying lessons,
-and began to repeat it, but her voice sounded hoarse and
-strange, and the words did not come the same as they used to do:--
-
- `How doth the little crocodile
- Improve his shining tail,
- And pour the waters of the Nile
- On every golden scale!
-
- `How cheerfully he seems to grin,
- How neatly spread his claws,
- And welcome little fishes in
- With gently smiling jaws!'
-
- `I'm sure those are not the right words,' said poor Alice, and
-her eyes filled with tears again as she went on, `I must be Mabel
-after all, and I shall have to go and live in that poky little
-house, and have next to no toys to play with, and oh! ever so
-many lessons to learn! No, I've made up my mind about it; if I'm
-Mabel, I'll stay down here! It'll be no use their putting their
-heads down and saying "Come up again, dear!" I shall only look
-up and say "Who am I then? Tell me that first, and then, if I
-like being that person, I'll come up: if not, I'll stay down
-here till I'm somebody else"--but, oh dear!' cried Alice, with a
-sudden burst of tears, `I do wish they WOULD put their heads
-down! I am so VERY tired of being all alone here!'
-
- As she said this she looked down at her hands, and was
-surprised to see that she had put on one of the Rabbit's little
-white kid gloves while she was talking. `How CAN I have done
-that?' she thought. `I must be growing small again.' She got up
-and went to the table to measure herself by it, and found that,
-as nearly as she could guess, she was now about two feet high,
-and was going on shrinking rapidly: she soon found out that the
-cause of this was the fan she was holding, and she dropped it
-hastily, just in time to avoid shrinking away altogether.
-
-`That WAS a narrow escape!' said Alice, a good deal frightened at
-the sudden change, but very glad to find herself still in
-existence; `and now for the garden!' and she ran with all speed
-back to the little door: but, alas! the little door was shut
-again, and the little golden key was lying on the glass table as
-before, `and things are worse than ever,' thought the poor child,
-`for I never was so small as this before, never! And I declare
-it's too bad, that it is!'
-
- As she said these words her foot slipped, and in another
-moment, splash! she was up to her chin in salt water. He first
-idea was that she had somehow fallen into the sea, `and in that
-case I can go back by railway,' she said to herself. (Alice had
-been to the seaside once in her life, and had come to the general
-conclusion, that wherever you go to on the English coast you find
-a number of bathing machines in the sea, some children digging in
-the sand with wooden spades, then a row of lodging houses, and
-behind them a railway station.) However, she soon made out that
-she was in the pool of tears which she had wept when she was nine
-feet high.
-
- `I wish I hadn't cried so much!' said Alice, as she swam about,
-trying to find her way out. `I shall be punished for it now, I
-suppose, by being drowned in my own tears! That WILL be a queer
-thing, to be sure! However, everything is queer to-day.'
-
- Just then she heard something splashing about in the pool a
-little way off, and she swam nearer to make out what it was: at
-first she thought it must be a walrus or hippopotamus, but then
-she remembered how small she was now, and she soon made out that
-it was only a mouse that had slipped in like herself.
-
- `Would it be of any use, now,' thought Alice, `to speak to this
-mouse? Everything is so out-of-the-way down here, that I should
-think very likely it can talk: at any rate, there's no harm in
-trying.' So she began: `O Mouse, do you know the way out of
-this pool? I am very tired of swimming about here, O Mouse!'
-(Alice thought this must be the right way of speaking to a mouse:
-she had never done such a thing before, but she remembered having
-seen in her brother's Latin Grammar, `A mouse--of a mouse--to a
-mouse--a mouse--O mouse!' The Mouse looked at her rather
-inquisitively, and seemed to her to wink with one of its little
-eyes, but it said nothing.
-
- `Perhaps it doesn't understand English,' thought Alice; `I
-daresay it's a French mouse, come over with William the
-Conqueror.' (For, with all her knowledge of history, Alice had
-no very clear notion how long ago anything had happened.) So she
-began again: `Ou est ma chatte?' which was the first sentence in
-her French lesson-book. The Mouse gave a sudden leap out of the
-water, and seemed to quiver all over with fright. `Oh, I beg
-your pardon!' cried Alice hastily, afraid that she had hurt the
-poor animal's feelings. `I quite forgot you didn't like cats.'
-
- `Not like cats!' cried the Mouse, in a shrill, passionate
-voice. `Would YOU like cats if you were me?'
-
- `Well, perhaps not,' said Alice in a soothing tone: `don't be
-angry about it. And yet I wish I could show you our cat Dinah:
-I think you'd take a fancy to cats if you could only see her.
-She is such a dear quiet thing,' Alice went on, half to herself,
-as she swam lazily about in the pool, `and she sits purring so
-nicely by the fire, licking her paws and washing her face--and
-she is such a nice soft thing to nurse--and she's such a capital
-one for catching mice--oh, I beg your pardon!' cried Alice again,
-for this time the Mouse was bristling all over, and she felt
-certain it must be really offended. `We won't talk about her any
-more if you'd rather not.'
-
- `We indeed!' cried the Mouse, who was trembling down to the end
-of his tail. `As if I would talk on such a subject! Our family
-always HATED cats: nasty, low, vulgar things! Don't let me hear
-the name again!'
-
- `I won't indeed!' said Alice, in a great hurry to change the
-subject of conversation. `Are you--are you fond--of--of dogs?'
-The Mouse did not answer, so Alice went on eagerly: `There is
-such a nice little dog near our house I should like to show you!
-A little bright-eyed terrier, you know, with oh, such long curly
-brown hair! And it'll fetch things when you throw them, and
-it'll sit up and beg for its dinner, and all sorts of things--I
-can't remember half of them--and it belongs to a farmer, you
-know, and he says it's so useful, it's worth a hundred pounds!
-He says it kills all the rats and--oh dear!' cried Alice in a
-sorrowful tone, `I'm afraid I've offended it again!' For the
-Mouse was swimming away from her as hard as it could go, and
-making quite a commotion in the pool as it went.
-
- So she called softly after it, `Mouse dear! Do come back
-again, and we won't talk about cats or dogs either, if you don't
-like them!' When the Mouse heard this, it turned round and swam
-slowly back to her: its face was quite pale (with passion, Alice
-thought), and it said in a low trembling voice, `Let us get to
-the shore, and then I'll tell you my history, and you'll
-understand why it is I hate cats and dogs.'
-
- It was high time to go, for the pool was getting quite crowded
-with the birds and animals that had fallen into it: there were a
-Duck and a Dodo, a Lory and an Eaglet, and several other curious
-creatures. Alice led the way, and the whole party swam to the
-shore.
-
-
-
- CHAPTER III
-
- A Caucus-Race and a Long Tale
-
-
- They were indeed a queer-looking party that assembled on the
-bank--the birds with draggled feathers, the animals with their
-fur clinging close to them, and all dripping wet, cross, and
-uncomfortable.
-
- The first question of course was, how to get dry again: they
-had a consultation about this, and after a few minutes it seemed
-quite natural to Alice to find herself talking familiarly with
-them, as if she had known them all her life. Indeed, she had
-quite a long argument with the Lory, who at last turned sulky,
-and would only say, `I am older than you, and must know better';
-and this Alice would not allow without knowing how old it was,
-and, as the Lory positively refused to tell its age, there was no
-more to be said.
-
- At last the Mouse, who seemed to be a person of authority among
-them, called out, `Sit down, all of you, and listen to me! I'LL
-soon make you dry enough!' They all sat down at once, in a large
-ring, with the Mouse in the middle. Alice kept her eyes
-anxiously fixed on it, for she felt sure she would catch a bad
-cold if she did not get dry very soon.
-
- `Ahem!' said the Mouse with an important air, `are you all ready?
-This is the driest thing I know. Silence all round, if you please!
-"William the Conqueror, whose cause was favoured by the pope, was
-soon submitted to by the English, who wanted leaders, and had been
-of late much accustomed to usurpation and conquest. Edwin and
-Morcar, the earls of Mercia and Northumbria--"'
-
- `Ugh!' said the Lory, with a shiver.
-
- `I beg your pardon!' said the Mouse, frowning, but very
-politely: `Did you speak?'
-
- `Not I!' said the Lory hastily.
-
- `I thought you did,' said the Mouse. `--I proceed. "Edwin and
-Morcar, the earls of Mercia and Northumbria, declared for him:
-and even Stigand, the patriotic archbishop of Canterbury, found
-it advisable--"'
-
- `Found WHAT?' said the Duck.
-
- `Found IT,' the Mouse replied rather crossly: `of course you
-know what "it" means.'
-
- `I know what "it" means well enough, when I find a thing,' said
-the Duck: `it's generally a frog or a worm. The question is,
-what did the archbishop find?'
-
- The Mouse did not notice this question, but hurriedly went on,
-`"--found it advisable to go with Edgar Atheling to meet William
-and offer him the crown. William's conduct at first was
-moderate. But the insolence of his Normans--" How are you
-getting on now, my dear?' it continued, turning to Alice as it
-spoke.
-
- `As wet as ever,' said Alice in a melancholy tone: `it doesn't
-seem to dry me at all.'
-
- `In that case,' said the Dodo solemnly, rising to its feet, `I
-move that the meeting adjourn, for the immediate adoption of more
-energetic remedies--'
-
- `Speak English!' said the Eaglet. `I don't know the meaning of
-half those long words, and, what's more, I don't believe you do
-either!' And the Eaglet bent down its head to hide a smile:
-some of the other birds tittered audibly.
-
- `What I was going to say,' said the Dodo in an offended tone,
-`was, that the best thing to get us dry would be a Caucus-race.'
-
- `What IS a Caucus-race?' said Alice; not that she wanted much
-to know, but the Dodo had paused as if it thought that SOMEBODY
-ought to speak, and no one else seemed inclined to say anything.
-
- `Why,' said the Dodo, `the best way to explain it is to do it.'
-(And, as you might like to try the thing yourself, some winter
-day, I will tell you how the Dodo managed it.)
-
- First it marked out a race-course, in a sort of circle, (`the
-exact shape doesn't matter,' it said,) and then all the party
-were placed along the course, here and there. There was no `One,
-two, three, and away,' but they began running when they liked,
-and left off when they liked, so that it was not easy to know
-when the race was over. However, when they had been running half
-an hour or so, and were quite dry again, the Dodo suddenly called
-out `The race is over!' and they all crowded round it, panting,
-and asking, `But who has won?'
-
- This question the Dodo could not answer without a great deal of
-thought, and it sat for a long time with one finger pressed upon
-its forehead (the position in which you usually see Shakespeare,
-in the pictures of him), while the rest waited in silence. At
-last the Dodo said, `EVERYBODY has won, and all must have
-prizes.'
-
- `But who is to give the prizes?' quite a chorus of voices
-asked.
-
- `Why, SHE, of course,' said the Dodo, pointing to Alice with
-one finger; and the whole party at once crowded round her,
-calling out in a confused way, `Prizes! Prizes!'
-
- Alice had no idea what to do, and in despair she put her hand
-in her pocket, and pulled out a box of comfits, (luckily the salt
-water had not got into it), and handed them round as prizes.
-There was exactly one a-piece all round.
-
- `But she must have a prize herself, you know,' said the Mouse.
-
- `Of course,' the Dodo replied very gravely. `What else have
-you got in your pocket?' he went on, turning to Alice.
-
- `Only a thimble,' said Alice sadly.
-
- `Hand it over here,' said the Dodo.
-
- Then they all crowded round her once more, while the Dodo
-solemnly presented the thimble, saying `We beg your acceptance of
-this elegant thimble'; and, when it had finished this short
-speech, they all cheered.
-
- Alice thought the whole thing very absurd, but they all looked
-so grave that she did not dare to laugh; and, as she could not
-think of anything to say, she simply bowed, and took the thimble,
-looking as solemn as she could.
-
- The next thing was to eat the comfits: this caused some noise
-and confusion, as the large birds complained that they could not
-taste theirs, and the small ones choked and had to be patted on
-the back. However, it was over at last, and they sat down again
-in a ring, and begged the Mouse to tell them something more.
-
- `You promised to tell me your history, you know,' said Alice,
-`and why it is you hate--C and D,' she added in a whisper, half
-afraid that it would be offended again.
-
- `Mine is a long and a sad tale!' said the Mouse, turning to
-Alice, and sighing.
-
- `It IS a long tail, certainly,' said Alice, looking down with
-wonder at the Mouse's tail; `but why do you call it sad?' And
-she kept on puzzling about it while the Mouse was speaking, so
-that her idea of the tale was something like this:--
-
- `Fury said to a
- mouse, That he
- met in the
- house,
- "Let us
- both go to
- law: I will
- prosecute
- YOU. --Come,
- I'll take no
- denial; We
- must have a
- trial: For
- really this
- morning I've
- nothing
- to do."
- Said the
- mouse to the
- cur, "Such
- a trial,
- dear Sir,
- With
- no jury
- or judge,
- would be
- wasting
- our
- breath."
- "I'll be
- judge, I'll
- be jury,"
- Said
- cunning
- old Fury:
- "I'll
- try the
- whole
- cause,
- and
- condemn
- you
- to
- death."'
-
-
- `You are not attending!' said the Mouse to Alice severely.
-`What are you thinking of?'
-
- `I beg your pardon,' said Alice very humbly: `you had got to
-the fifth bend, I think?'
-
- `I had NOT!' cried the Mouse, sharply and very angrily.
-
- `A knot!' said Alice, always ready to make herself useful, and
-looking anxiously about her. `Oh, do let me help to undo it!'
-
- `I shall do nothing of the sort,' said the Mouse, getting up
-and walking away. `You insult me by talking such nonsense!'
-
- `I didn't mean it!' pleaded poor Alice. `But you're so easily
-offended, you know!'
-
- The Mouse only growled in reply.
-
- `Please come back and finish your story!' Alice called after
-it; and the others all joined in chorus, `Yes, please do!' but
-the Mouse only shook its head impatiently, and walked a little
-quicker.
-
- `What a pity it wouldn't stay!' sighed the Lory, as soon as it
-was quite out of sight; and an old Crab took the opportunity of
-saying to her daughter `Ah, my dear! Let this be a lesson to you
-never to lose YOUR temper!' `Hold your tongue, Ma!' said the
-young Crab, a little snappishly. `You're enough to try the
-patience of an oyster!'
-
- `I wish I had our Dinah here, I know I do!' said Alice aloud,
-addressing nobody in particular. `She'd soon fetch it back!'
-
- `And who is Dinah, if I might venture to ask the question?'
-said the Lory.
-
- Alice replied eagerly, for she was always ready to talk about
-her pet: `Dinah's our cat. And she's such a capital one for
-catching mice you can't think! And oh, I wish you could see her
-after the birds! Why, she'll eat a little bird as soon as look
-at it!'
-
- This speech caused a remarkable sensation among the party.
-Some of the birds hurried off at once: one the old Magpie began
-wrapping itself up very carefully, remarking, `I really must be
-getting home; the night-air doesn't suit my throat!' and a Canary
-called out in a trembling voice to its children, `Come away, my
-dears! It's high time you were all in bed!' On various pretexts
-they all moved off, and Alice was soon left alone.
-
- `I wish I hadn't mentioned Dinah!' she said to herself in a
-melancholy tone. `Nobody seems to like her, down here, and I'm
-sure she's the best cat in the world! Oh, my dear Dinah! I
-wonder if I shall ever see you any more!' And here poor Alice
-began to cry again, for she felt very lonely and low-spirited.
-In a little while, however, she again heard a little pattering of
-footsteps in the distance, and she looked up eagerly, half hoping
-that the Mouse had changed his mind, and was coming back to
-finish his story.
-
-
-
- CHAPTER IV
-
- The Rabbit Sends in a Little Bill
-
-
- It was the White Rabbit, trotting slowly back again, and
-looking anxiously about as it went, as if it had lost something;
-and she heard it muttering to itself `The Duchess! The Duchess!
-Oh my dear paws! Oh my fur and whiskers! She'll get me
-executed, as sure as ferrets are ferrets! Where CAN I have
-dropped them, I wonder?' Alice guessed in a moment that it was
-looking for the fan and the pair of white kid gloves, and she
-very good-naturedly began hunting about for them, but they were
-nowhere to be seen--everything seemed to have changed since her
-swim in the pool, and the great hall, with the glass table and
-the little door, had vanished completely.
-
- Very soon the Rabbit noticed Alice, as she went hunting about,
-and called out to her in an angry tone, `Why, Mary Ann, what ARE
-you doing out here? Run home this moment, and fetch me a pair of
-gloves and a fan! Quick, now!' And Alice was so much frightened
-that she ran off at once in the direction it pointed to, without
-trying to explain the mistake it had made.
-
- `He took me for his housemaid,' she said to herself as she ran.
-`How surprised he'll be when he finds out who I am! But I'd
-better take him his fan and gloves--that is, if I can find them.'
-As she said this, she came upon a neat little house, on the door
-of which was a bright brass plate with the name `W. RABBIT'
-engraved upon it. She went in without knocking, and hurried
-upstairs, in great fear lest she should meet the real Mary Ann,
-and be turned out of the house before she had found the fan and
-gloves.
-
- `How queer it seems,' Alice said to herself, `to be going
-messages for a rabbit! I suppose Dinah'll be sending me on
-messages next!' And she began fancying the sort of thing that
-would happen: `"Miss Alice! Come here directly, and get ready
-for your walk!" "Coming in a minute, nurse! But I've got to see
-that the mouse doesn't get out." Only I don't think,' Alice went
-on, `that they'd let Dinah stop in the house if it began ordering
-people about like that!'
-
- By this time she had found her way into a tidy little room with
-a table in the window, and on it (as she had hoped) a fan and two
-or three pairs of tiny white kid gloves: she took up the fan and
-a pair of the gloves, and was just going to leave the room, when
-her eye fell upon a little bottle that stood near the looking-
-glass. There was no label this time with the words `DRINK ME,'
-but nevertheless she uncorked it and put it to her lips. `I know
-SOMETHING interesting is sure to happen,' she said to herself,
-`whenever I eat or drink anything; so I'll just see what this
-bottle does. I do hope it'll make me grow large again, for
-really I'm quite tired of being such a tiny little thing!'
-
- It did so indeed, and much sooner than she had expected:
-before she had drunk half the bottle, she found her head pressing
-against the ceiling, and had to stoop to save her neck from being
-broken. She hastily put down the bottle, saying to herself
-`That's quite enough--I hope I shan't grow any more--As it is, I
-can't get out at the door--I do wish I hadn't drunk quite so
-much!'
-
- Alas! it was too late to wish that! She went on growing, and
-growing, and very soon had to kneel down on the floor: in
-another minute there was not even room for this, and she tried
-the effect of lying down with one elbow against the door, and the
-other arm curled round her head. Still she went on growing, and,
-as a last resource, she put one arm out of the window, and one
-foot up the chimney, and said to herself `Now I can do no more,
-whatever happens. What WILL become of me?'
-
- Luckily for Alice, the little magic bottle had now had its full
-effect, and she grew no larger: still it was very uncomfortable,
-and, as there seemed to be no sort of chance of her ever getting
-out of the room again, no wonder she felt unhappy.
-
- `It was much pleasanter at home,' thought poor Alice, `when one
-wasn't always growing larger and smaller, and being ordered about
-by mice and rabbits. I almost wish I hadn't gone down that
-rabbit-hole--and yet--and yet--it's rather curious, you know,
-this sort of life! I do wonder what CAN have happened to me!
-When I used to read fairy-tales, I fancied that kind of thing
-never happened, and now here I am in the middle of one! There
-ought to be a book written about me, that there ought! And when
-I grow up, I'll write one--but I'm grown up now,' she added in a
-sorrowful tone; `at least there's no room to grow up any more
-HERE.'
-
- `But then,' thought Alice, `shall I NEVER get any older than I
-am now? That'll be a comfort, one way--never to be an old woman-
--but then--always to have lessons to learn! Oh, I shouldn't like
-THAT!'
-
- `Oh, you foolish Alice!' she answered herself. `How can you
-learn lessons in here? Why, there's hardly room for YOU, and no
-room at all for any lesson-books!'
-
- And so she went on, taking first one side and then the other,
-and making quite a conversation of it altogether; but after a few
-minutes she heard a voice outside, and stopped to listen.
-
- `Mary Ann! Mary Ann!' said the voice. `Fetch me my gloves
-this moment!' Then came a little pattering of feet on the
-stairs. Alice knew it was the Rabbit coming to look for her, and
-she trembled till she shook the house, quite forgetting that she
-was now about a thousand times as large as the Rabbit, and had no
-reason to be afraid of it.
-
- Presently the Rabbit came up to the door, and tried to open it;
-but, as the door opened inwards, and Alice's elbow was pressed
-hard against it, that attempt proved a failure. Alice heard it
-say to itself `Then I'll go round and get in at the window.'
-
- `THAT you won't' thought Alice, and, after waiting till she
-fancied she heard the Rabbit just under the window, she suddenly
-spread out her hand, and made a snatch in the air. She did not
-get hold of anything, but she heard a little shriek and a fall,
-and a crash of broken glass, from which she concluded that it was
-just possible it had fallen into a cucumber-frame, or something
-of the sort.
-
- Next came an angry voice--the Rabbit's--`Pat! Pat! Where are
-you?' And then a voice she had never heard before, `Sure then
-I'm here! Digging for apples, yer honour!'
-
- `Digging for apples, indeed!' said the Rabbit angrily. `Here!
-Come and help me out of THIS!' (Sounds of more broken glass.)
-
- `Now tell me, Pat, what's that in the window?'
-
- `Sure, it's an arm, yer honour!' (He pronounced it `arrum.')
-
- `An arm, you goose! Who ever saw one that size? Why, it
-fills the whole window!'
-
- `Sure, it does, yer honour: but it's an arm for all that.'
-
- `Well, it's got no business there, at any rate: go and take it
-away!'
-
- There was a long silence after this, and Alice could only hear
-whispers now and then; such as, `Sure, I don't like it, yer
-honour, at all, at all!' `Do as I tell you, you coward!' and at
-last she spread out her hand again, and made another snatch in
-the air. This time there were TWO little shrieks, and more
-sounds of broken glass. `What a number of cucumber-frames there
-must be!' thought Alice. `I wonder what they'll do next! As for
-pulling me out of the window, I only wish they COULD! I'm sure I
-don't want to stay in here any longer!'
-
- She waited for some time without hearing anything more: at
-last came a rumbling of little cartwheels, and the sound of a
-good many voice all talking together: she made out the words:
-`Where's the other ladder?--Why, I hadn't to bring but one;
-Bill's got the other--Bill! fetch it here, lad!--Here, put 'em up
-at this corner--No, tie 'em together first--they don't reach half
-high enough yet--Oh! they'll do well enough; don't be particular-
--Here, Bill! catch hold of this rope--Will the roof bear?--Mind
-that loose slate--Oh, it's coming down! Heads below!' (a loud
-crash)--`Now, who did that?--It was Bill, I fancy--Who's to go
-down the chimney?--Nay, I shan't! YOU do it!--That I won't,
-then!--Bill's to go down--Here, Bill! the master says you're to
-go down the chimney!'
-
- `Oh! So Bill's got to come down the chimney, has he?' said
-Alice to herself. `Shy, they seem to put everything upon Bill!
-I wouldn't be in Bill's place for a good deal: this fireplace is
-narrow, to be sure; but I THINK I can kick a little!'
-
- She drew her foot as far down the chimney as she could, and
-waited till she heard a little animal (she couldn't guess of what
-sort it was) scratching and scrambling about in the chimney close
-above her: then, saying to herself `This is Bill,' she gave one
-sharp kick, and waited to see what would happen next.
-
- The first thing she heard was a general chorus of `There goes
-Bill!' then the Rabbit's voice along--`Catch him, you by the
-hedge!' then silence, and then another confusion of voices--`Hold
-up his head--Brandy now--Don't choke him--How was it, old fellow?
-What happened to you? Tell us all about it!'
-
- Last came a little feeble, squeaking voice, (`That's Bill,'
-thought Alice,) `Well, I hardly know--No more, thank ye; I'm
-better now--but I'm a deal too flustered to tell you--all I know
-is, something comes at me like a Jack-in-the-box, and up I goes
-like a sky-rocket!'
-
- `So you did, old fellow!' said the others.
-
- `We must burn the house down!' said the Rabbit's voice; and
-Alice called out as loud as she could, `If you do. I'll set
-Dinah at you!'
-
- There was a dead silence instantly, and Alice thought to
-herself, `I wonder what they WILL do next! If they had any
-sense, they'd take the roof off.' After a minute or two, they
-began moving about again, and Alice heard the Rabbit say, `A
-barrowful will do, to begin with.'
-
- `A barrowful of WHAT?' thought Alice; but she had not long to
-doubt, for the next moment a shower of little pebbles came
-rattling in at the window, and some of them hit her in the face.
-`I'll put a stop to this,' she said to herself, and shouted out,
-`You'd better not do that again!' which produced another dead
-silence.
-
- Alice noticed with some surprise that the pebbles were all
-turning into little cakes as they lay on the floor, and a bright
-idea came into her head. `If I eat one of these cakes,' she
-thought, `it's sure to make SOME change in my size; and as it
-can't possibly make me larger, it must make me smaller, I
-suppose.'
-
- So she swallowed one of the cakes, and was delighted to find
-that she began shrinking directly. As soon as she was small
-enough to get through the door, she ran out of the house, and
-found quite a crowd of little animals and birds waiting outside.
-The poor little Lizard, Bill, was in the middle, being held up by
-two guinea-pigs, who were giving it something out of a bottle.
-They all made a rush at Alice the moment she appeared; but she
-ran off as hard as she could, and soon found herself safe in a
-thick wood.
-
- `The first thing I've got to do,' said Alice to herself, as she
-wandered about in the wood, `is to grow to my right size again;
-and the second thing is to find my way into that lovely garden.
-I think that will be the best plan.'
-
- It sounded an excellent plan, no doubt, and very neatly and
-simply arranged; the only difficulty was, that she had not the
-smallest idea how to set about it; and while she was peering
-about anxiously among the trees, a little sharp bark just over
-her head made her look up in a great hurry.
-
- An enormous puppy was looking down at her with large round
-eyes, and feebly stretching out one paw, trying to touch her.
-`Poor little thing!' said Alice, in a coaxing tone, and she tried
-hard to whistle to it; but she was terribly frightened all the
-time at the thought that it might be hungry, in which case it
-would be very likely to eat her up in spite of all her coaxing.
-
- Hardly knowing what she did, she picked up a little bit of
-stick, and held it out to the puppy; whereupon the puppy jumped
-into the air off all its feet at once, with a yelp of delight,
-and rushed at the stick, and made believe to worry it; then Alice
-dodged behind a great thistle, to keep herself from being run
-over; and the moment she appeared on the other side, the puppy
-made another rush at the stick, and tumbled head over heels in
-its hurry to get hold of it; then Alice, thinking it was very
-like having a game of play with a cart-horse, and expecting every
-moment to be trampled under its feet, ran round the thistle
-again; then the puppy began a series of short charges at the
-stick, running a very little way forwards each time and a long
-way back, and barking hoarsely all the while, till at last it sat
-down a good way off, panting, with its tongue hanging out of its
-mouth, and its great eyes half shut.
-
- This seemed to Alice a good opportunity for making her escape;
-so she set off at once, and ran till she was quite tired and out
-of breath, and till the puppy's bark sounded quite faint in the
-distance.
-
- `And yet what a dear little puppy it was!' said Alice, as she
-leant against a buttercup to rest herself, and fanned herself
-with one of the leaves: `I should have liked teaching it tricks
-very much, if--if I'd only been the right size to do it! Oh
-dear! I'd nearly forgotten that I've got to grow up again! Let
-me see--how IS it to be managed? I suppose I ought to eat or
-drink something or other; but the great question is, what?'
-
- The great question certainly was, what? Alice looked all round
-her at the flowers and the blades of grass, but she did not see
-anything that looked like the right thing to eat or drink under
-the circumstances. There was a large mushroom growing near her,
-about the same height as herself; and when she had looked under
-it, and on both sides of it, and behind it, it occurred to her
-that she might as well look and see what was on the top of it.
-
- She stretched herself up on tiptoe, and peeped over the edge of
-the mushroom, and her eyes immediately met those of a large
-caterpillar, that was sitting on the top with its arms folded,
-quietly smoking a long hookah, and taking not the smallest notice
-of her or of anything else.
-
-
-
- CHAPTER V
-
- Advice from a Caterpillar
-
-
- The Caterpillar and Alice looked at each other for some time in
-silence: at last the Caterpillar took the hookah out of its
-mouth, and addressed her in a languid, sleepy voice.
-
- `Who are YOU?' said the Caterpillar.
-
- This was not an encouraging opening for a conversation. Alice
-replied, rather shyly, `I--I hardly know, sir, just at present--
-at least I know who I WAS when I got up this morning, but I think
-I must have been changed several times since then.'
-
- `What do you mean by that?' said the Caterpillar sternly.
-`Explain yourself!'
-
- `I can't explain MYSELF, I'm afraid, sir' said Alice, `because
-I'm not myself, you see.'
-
- `I don't see,' said the Caterpillar.
-
- `I'm afraid I can't put it more clearly,' Alice replied very
-politely, `for I can't understand it myself to begin with; and
-being so many different sizes in a day is very confusing.'
-
- `It isn't,' said the Caterpillar.
-
- `Well, perhaps you haven't found it so yet,' said Alice; `but
-when you have to turn into a chrysalis--you will some day, you
-know--and then after that into a butterfly, I should think you'll
-feel it a little queer, won't you?'
-
- `Not a bit,' said the Caterpillar.
-
- `Well, perhaps your feelings may be different,' said Alice;
-`all I know is, it would feel very queer to ME.'
-
- `You!' said the Caterpillar contemptuously. `Who are YOU?'
-
- Which brought them back again to the beginning of the
-conversation. Alice felt a little irritated at the Caterpillar's
-making such VERY short remarks, and she drew herself up and said,
-very gravely, `I think, you ought to tell me who YOU are, first.'
-
- `Why?' said the Caterpillar.
-
- Here was another puzzling question; and as Alice could not
-think of any good reason, and as the Caterpillar seemed to be in
-a VERY unpleasant state of mind, she turned away.
-
- `Come back!' the Caterpillar called after her. `I've something
-important to say!'
-
- This sounded promising, certainly: Alice turned and came back
-again.
-
- `Keep your temper,' said the Caterpillar.
-
- `Is that all?' said Alice, swallowing down her anger as well as
-she could.
-
- `No,' said the Caterpillar.
-
- Alice thought she might as well wait, as she had nothing else
-to do, and perhaps after all it might tell her something worth
-hearing. For some minutes it puffed away without speaking, but
-at last it unfolded its arms, took the hookah out of its mouth
-again, and said, `So you think you're changed, do you?'
-
- `I'm afraid I am, sir,' said Alice; `I can't remember things as
-I used--and I don't keep the same size for ten minutes together!'
-
- `Can't remember WHAT things?' said the Caterpillar.
-
- `Well, I've tried to say "HOW DOTH THE LITTLE BUSY BEE," but it
-all came different!' Alice replied in a very melancholy voice.
-
- `Repeat, "YOU ARE OLD, FATHER WILLIAM,"' said the Caterpillar.
-
- Alice folded her hands, and began:--
-
- `You are old, Father William,' the young man said,
- `And your hair has become very white;
- And yet you incessantly stand on your head--
- Do you think, at your age, it is right?'
-
- `In my youth,' Father William replied to his son,
- `I feared it might injure the brain;
- But, now that I'm perfectly sure I have none,
- Why, I do it again and again.'
-
- `You are old,' said the youth, `as I mentioned before,
- And have grown most uncommonly fat;
- Yet you turned a back-somersault in at the door--
- Pray, what is the reason of that?'
-
- `In my youth,' said the sage, as he shook his grey locks,
- `I kept all my limbs very supple
- By the use of this ointment--one shilling the box--
- Allow me to sell you a couple?'
-
- `You are old,' said the youth, `and your jaws are too weak
- For anything tougher than suet;
- Yet you finished the goose, with the bones and the beak--
- Pray how did you manage to do it?'
-
- `In my youth,' said his father, `I took to the law,
- And argued each case with my wife;
- And the muscular strength, which it gave to my jaw,
- Has lasted the rest of my life.'
-
- `You are old,' said the youth, `one would hardly suppose
- That your eye was as steady as ever;
- Yet you balanced an eel on the end of your nose--
- What made you so awfully clever?'
-
- `I have answered three questions, and that is enough,'
- Said his father; `don't give yourself airs!
- Do you think I can listen all day to such stuff?
- Be off, or I'll kick you down stairs!'
-
-
- `That is not said right,' said the Caterpillar.
-
- `Not QUITE right, I'm afraid,' said Alice, timidly; `some of the
-words have got altered.'
-
- `It is wrong from beginning to end,' said the Caterpillar
-decidedly, and there was silence for some minutes.
-
- The Caterpillar was the first to speak.
-
- `What size do you want to be?' it asked.
-
- `Oh, I'm not particular as to size,' Alice hastily replied;
-`only one doesn't like changing so often, you know.'
-
- `I DON'T know,' said the Caterpillar.
-
- Alice said nothing: she had never been so much contradicted in
-her life before, and she felt that she was losing her temper.
-
- `Are you content now?' said the Caterpillar.
-
- `Well, I should like to be a LITTLE larger, sir, if you
-wouldn't mind,' said Alice: `three inches is such a wretched
-height to be.'
-
- `It is a very good height indeed!' said the Caterpillar
-angrily, rearing itself upright as it spoke (it was exactly three
-inches high).
-
- `But I'm not used to it!' pleaded poor Alice in a piteous tone.
-And she thought of herself, `I wish the creatures wouldn't be so
-easily offended!'
-
- `You'll get used to it in time,' said the Caterpillar; and it
-put the hookah into its mouth and began smoking again.
-
- This time Alice waited patiently until it chose to speak again.
-In a minute or two the Caterpillar took the hookah out of its
-mouth and yawned once or twice, and shook itself. Then it got
-down off the mushroom, and crawled away in the grass, merely
-remarking as it went, `One side will make you grow taller, and
-the other side will make you grow shorter.'
-
- `One side of WHAT? The other side of WHAT?' thought Alice to
-herself.
-
- `Of the mushroom,' said the Caterpillar, just as if she had
-asked it aloud; and in another moment it was out of sight.
-
- Alice remained looking thoughtfully at the mushroom for a
-minute, trying to make out which were the two sides of it; and as
-it was perfectly round, she found this a very difficult question.
-However, at last she stretched her arms round it as far as they
-would go, and broke off a bit of the edge with each hand.
-
- `And now which is which?' she said to herself, and nibbled a
-little of the right-hand bit to try the effect: the next moment
-she felt a violent blow underneath her chin: it had struck her
-foot!
-
- She was a good deal frightened by this very sudden change, but
-she felt that there was no time to be lost, as she was shrinking
-rapidly; so she set to work at once to eat some of the other bit.
-Her chin was pressed so closely against her foot, that there was
-hardly room to open her mouth; but she did it at last, and
-managed to swallow a morsel of the lefthand bit.
-
-
- * * * * * * *
-
- * * * * * *
-
- * * * * * * *
-
- `Come, my head's free at last!' said Alice in a tone of
-delight, which changed into alarm in another moment, when she
-found that her shoulders were nowhere to be found: all she could
-see, when she looked down, was an immense length of neck, which
-seemed to rise like a stalk out of a sea of green leaves that lay
-far below her.
-
- `What CAN all that green stuff be?' said Alice. `And where
-HAVE my shoulders got to? And oh, my poor hands, how is it I
-can't see you?' She was moving them about as she spoke, but no
-result seemed to follow, except a little shaking among the
-distant green leaves.
-
- As there seemed to be no chance of getting her hands up to her
-head, she tried to get her head down to them, and was delighted
-to find that her neck would bend about easily in any direction,
-like a serpent. She had just succeeded in curving it down into a
-graceful zigzag, and was going to dive in among the leaves, which
-she found to be nothing but the tops of the trees under which she
-had been wandering, when a sharp hiss made her draw back in a
-hurry: a large pigeon had flown into her face, and was beating
-her violently with its wings.
-
- `Serpent!' screamed the Pigeon.
-
- `I'm NOT a serpent!' said Alice indignantly. `Let me alone!'
-
- `Serpent, I say again!' repeated the Pigeon, but in a more
-subdued tone, and added with a kind of sob, `I've tried every
-way, and nothing seems to suit them!'
-
- `I haven't the least idea what you're talking about,' said
-Alice.
-
- `I've tried the roots of trees, and I've tried banks, and I've
-tried hedges,' the Pigeon went on, without attending to her; `but
-those serpents! There's no pleasing them!'
-
- Alice was more and more puzzled, but she thought there was no
-use in saying anything more till the Pigeon had finished.
-
- `As if it wasn't trouble enough hatching the eggs,' said the
-Pigeon; `but I must be on the look-out for serpents night and
-day! Why, I haven't had a wink of sleep these three weeks!'
-
- `I'm very sorry you've been annoyed,' said Alice, who was
-beginning to see its meaning.
-
- `And just as I'd taken the highest tree in the wood,' continued
-the Pigeon, raising its voice to a shriek, `and just as I was
-thinking I should be free of them at last, they must needs come
-wriggling down from the sky! Ugh, Serpent!'
-
- `But I'm NOT a serpent, I tell you!' said Alice. `I'm a--I'm
-a--'
-
- `Well! WHAT are you?' said the Pigeon. `I can see you're
-trying to invent something!'
-
- `I--I'm a little girl,' said Alice, rather doubtfully, as she
-remembered the number of changes she had gone through that day.
-
- `A likely story indeed!' said the Pigeon in a tone of the
-deepest contempt. `I've seen a good many little girls in my
-time, but never ONE with such a neck as that! No, no! You're a
-serpent; and there's no use denying it. I suppose you'll be
-telling me next that you never tasted an egg!'
-
- `I HAVE tasted eggs, certainly,' said Alice, who was a very
-truthful child; `but little girls eat eggs quite as much as
-serpents do, you know.'
-
- `I don't believe it,' said the Pigeon; `but if they do, why
-then they're a kind of serpent, that's all I can say.'
-
- This was such a new idea to Alice, that she was quite silent
-for a minute or two, which gave the Pigeon the opportunity of
-adding, `You're looking for eggs, I know THAT well enough; and
-what does it matter to me whether you're a little girl or a
-serpent?'
-
- `It matters a good deal to ME,' said Alice hastily; `but I'm
-not looking for eggs, as it happens; and if I was, I shouldn't
-want YOURS: I don't like them raw.'
-
- `Well, be off, then!' said the Pigeon in a sulky tone, as it
-settled down again into its nest. Alice crouched down among the
-trees as well as she could, for her neck kept getting entangled
-among the branches, and every now and then she had to stop and
-untwist it. After a while she remembered that she still held the
-pieces of mushroom in her hands, and she set to work very
-carefully, nibbling first at one and then at the other, and
-growing sometimes taller and sometimes shorter, until she had
-succeeded in bringing herself down to her usual height.
-
- It was so long since she had been anything near the right size,
-that it felt quite strange at first; but she got used to it in a
-few minutes, and began talking to herself, as usual. `Come,
-there's half my plan done now! How puzzling all these changes
-are! I'm never sure what I'm going to be, from one minute to
-another! However, I've got back to my right size: the next
-thing is, to get into that beautiful garden--how IS that to be
-done, I wonder?' As she said this, she came suddenly upon an
-open place, with a little house in it about four feet high.
-`Whoever lives there,' thought Alice, `it'll never do to come
-upon them THIS size: why, I should frighten them out of their
-wits!' So she began nibbling at the righthand bit again, and did
-not venture to go near the house till she had brought herself
-down to nine inches high.
-
-
-
- CHAPTER VI
-
- Pig and Pepper
-
-
- For a minute or two she stood looking at the house, and
-wondering what to do next, when suddenly a footman in livery came
-running out of the wood--(she considered him to be a footman
-because he was in livery: otherwise, judging by his face only,
-she would have called him a fish)--and rapped loudly at the door
-with his knuckles. It was opened by another footman in livery,
-with a round face, and large eyes like a frog; and both footmen,
-Alice noticed, had powdered hair that curled all over their
-heads. She felt very curious to know what it was all about, and
-crept a little way out of the wood to listen.
-
- The Fish-Footman began by producing from under his arm a great
-letter, nearly as large as himself, and this he handed over to
-the other, saying, in a solemn tone, `For the Duchess. An
-invitation from the Queen to play croquet.' The Frog-Footman
-repeated, in the same solemn tone, only changing the order of the
-words a little, `From the Queen. An invitation for the Duchess
-to play croquet.'
-
- Then they both bowed low, and their curls got entangled
-together.
-
- Alice laughed so much at this, that she had to run back into
-the wood for fear of their hearing her; and when she next peeped
-out the Fish-Footman was gone, and the other was sitting on the
-ground near the door, staring stupidly up into the sky.
-
- Alice went timidly up to the door, and knocked.
-
- `There's no sort of use in knocking,' said the Footman, `and
-that for two reasons. First, because I'm on the same side of the
-door as you are; secondly, because they're making such a noise
-inside, no one could possibly hear you.' And certainly there was
-a most extraordinary noise going on within--a constant howling
-and sneezing, and every now and then a great crash, as if a dish
-or kettle had been broken to pieces.
-
- `Please, then,' said Alice, `how am I to get in?'
-
- `There might be some sense in your knocking,' the Footman went
-on without attending to her, `if we had the door between us. For
-instance, if you were INSIDE, you might knock, and I could let
-you out, you know.' He was looking up into the sky all the time
-he was speaking, and this Alice thought decidedly uncivil. `But
-perhaps he can't help it,' she said to herself; `his eyes are so
-VERY nearly at the top of his head. But at any rate he might
-answer questions.--How am I to get in?' she repeated, aloud.
-
- `I shall sit here,' the Footman remarked, `till tomorrow--'
-
- At this moment the door of the house opened, and a large plate
-came skimming out, straight at the Footman's head: it just
-grazed his nose, and broke to pieces against one of the trees
-behind him.
-
- `--or next day, maybe,' the Footman continued in the same tone,
-exactly as if nothing had happened.
-
- `How am I to get in?' asked Alice again, in a louder tone.
-
- `ARE you to get in at all?' said the Footman. `That's the
-first question, you know.'
-
- It was, no doubt: only Alice did not like to be told so.
-`It's really dreadful,' she muttered to herself, `the way all the
-creatures argue. It's enough to drive one crazy!'
-
- The Footman seemed to think this a good opportunity for
-repeating his remark, with variations. `I shall sit here,' he
-said, `on and off, for days and days.'
-
- `But what am I to do?' said Alice.
-
- `Anything you like,' said the Footman, and began whistling.
-
- `Oh, there's no use in talking to him,' said Alice desperately:
-`he's perfectly idiotic!' And she opened the door and went in.
-
- The door led right into a large kitchen, which was full of
-smoke from one end to the other: the Duchess was sitting on a
-three-legged stool in the middle, nursing a baby; the cook was
-leaning over the fire, stirring a large cauldron which seemed to
-be full of soup.
-
- `There's certainly too much pepper in that soup!' Alice said to
-herself, as well as she could for sneezing.
-
- There was certainly too much of it in the air. Even the
-Duchess sneezed occasionally; and as for the baby, it was
-sneezing and howling alternately without a moment's pause. The
-only things in the kitchen that did not sneeze, were the cook,
-and a large cat which was sitting on the hearth and grinning from
-ear to ear.
-
- `Please would you tell me,' said Alice, a little timidly, for
-she was not quite sure whether it was good manners for her to
-speak first, `why your cat grins like that?'
-
- `It's a Cheshire cat,' said the Duchess, `and that's why.
-Pig!'
-
- She said the last word with such sudden violence that Alice
-quite jumped; but she saw in another moment that it was addressed
-to the baby, and not to her, so she took courage, and went on
-again:--
-
- `I didn't know that Cheshire cats always grinned; in fact, I
-didn't know that cats COULD grin.'
-
- `They all can,' said the Duchess; `and most of 'em do.'
-
- `I don't know of any that do,' Alice said very politely,
-feeling quite pleased to have got into a conversation.
-
- `You don't know much,' said the Duchess; `and that's a fact.'
-
- Alice did not at all like the tone of this remark, and thought
-it would be as well to introduce some other subject of
-conversation. While she was trying to fix on one, the cook took
-the cauldron of soup off the fire, and at once set to work
-throwing everything within her reach at the Duchess and the baby
---the fire-irons came first; then followed a shower of saucepans,
-plates, and dishes. The Duchess took no notice of them even when
-they hit her; and the baby was howling so much already, that it
-was quite impossible to say whether the blows hurt it or not.
-
- `Oh, PLEASE mind what you're doing!' cried Alice, jumping up
-and down in an agony of terror. `Oh, there goes his PRECIOUS
-nose'; as an unusually large saucepan flew close by it, and very
-nearly carried it off.
-
- `If everybody minded their own business,' the Duchess said in a
-hoarse growl, `the world would go round a deal faster than it
-does.'
-
- `Which would NOT be an advantage,' said Alice, who felt very
-glad to get an opportunity of showing off a little of her
-knowledge. `Just think of what work it would make with the day
-and night! You see the earth takes twenty-four hours to turn
-round on its axis--'
-
- `Talking of axes,' said the Duchess, `chop off her head!'
-
- Alice glanced rather anxiously at the cook, to see if she meant
-to take the hint; but the cook was busily stirring the soup, and
-seemed not to be listening, so she went on again: `Twenty-four
-hours, I THINK; or is it twelve? I--'
-
- `Oh, don't bother ME,' said the Duchess; `I never could abide
-figures!' And with that she began nursing her child again,
-singing a sort of lullaby to it as she did so, and giving it a
-violent shake at the end of every line:
-
- `Speak roughly to your little boy,
- And beat him when he sneezes:
- He only does it to annoy,
- Because he knows it teases.'
-
- CHORUS.
-
- (In which the cook and the baby joined):--
-
- `Wow! wow! wow!'
-
- While the Duchess sang the second verse of the song, she kept
-tossing the baby violently up and down, and the poor little thing
-howled so, that Alice could hardly hear the words:--
-
- `I speak severely to my boy,
- I beat him when he sneezes;
- For he can thoroughly enjoy
- The pepper when he pleases!'
-
- CHORUS.
-
- `Wow! wow! wow!'
-
- `Here! you may nurse it a bit, if you like!' the Duchess said
-to Alice, flinging the baby at her as she spoke. `I must go and
-get ready to play croquet with the Queen,' and she hurried out of
-the room. The cook threw a frying-pan after her as she went out,
-but it just missed her.
-
- Alice caught the baby with some difficulty, as it was a queer-
-shaped little creature, and held out its arms and legs in all
-directions, `just like a star-fish,' thought Alice. The poor
-little thing was snorting like a steam-engine when she caught it,
-and kept doubling itself up and straightening itself out again,
-so that altogether, for the first minute or two, it was as much
-as she could do to hold it.
-
- As soon as she had made out the proper way of nursing it,
-(which was to twist it up into a sort of knot, and then keep
-tight hold of its right ear and left foot, so as to prevent its
-undoing itself,) she carried it out into the open air. `IF I
-don't take this child away with me,' thought Alice, `they're sure
-to kill it in a day or two: wouldn't it be murder to leave it
-behind?' She said the last words out loud, and the little thing
-grunted in reply (it had left off sneezing by this time). `Don't
-grunt,' said Alice; `that's not at all a proper way of expressing
-yourself.'
-
- The baby grunted again, and Alice looked very anxiously into
-its face to see what was the matter with it. There could be no
-doubt that it had a VERY turn-up nose, much more like a snout
-than a real nose; also its eyes were getting extremely small for
-a baby: altogether Alice did not like the look of the thing at
-all. `But perhaps it was only sobbing,' she thought, and looked
-into its eyes again, to see if there were any tears.
-
- No, there were no tears. `If you're going to turn into a pig,
-my dear,' said Alice, seriously, `I'll have nothing more to do
-with you. Mind now!' The poor little thing sobbed again (or
-grunted, it was impossible to say which), and they went on for
-some while in silence.
-
- Alice was just beginning to think to herself, `Now, what am I
-to do with this creature when I get it home?' when it grunted
-again, so violently, that she looked down into its face in some
-alarm. This time there could be NO mistake about it: it was
-neither more nor less than a pig, and she felt that it would be
-quite absurd for her to carry it further.
-
- So she set the little creature down, and felt quite relieved to
-see it trot away quietly into the wood. `If it had grown up,'
-she said to herself, `it would have made a dreadfully ugly child:
-but it makes rather a handsome pig, I think.' And she began
-thinking over other children she knew, who might do very well as
-pigs, and was just saying to herself, `if one only knew the right
-way to change them--' when she was a little startled by seeing
-the Cheshire Cat sitting on a bough of a tree a few yards off.
-
- The Cat only grinned when it saw Alice. It looked good-
-natured, she thought: still it had VERY long claws and a great
-many teeth, so she felt that it ought to be treated with respect.
-
- `Cheshire Puss,' she began, rather timidly, as she did not at
-all know whether it would like the name: however, it only
-grinned a little wider. `Come, it's pleased so far,' thought
-Alice, and she went on. `Would you tell me, please, which way I
-ought to go from here?'
-
- `That depends a good deal on where you want to get to,' said
-the Cat.
-
- `I don't much care where--' said Alice.
-
- `Then it doesn't matter which way you go,' said the Cat.
-
- `--so long as I get SOMEWHERE,' Alice added as an explanation.
-
- `Oh, you're sure to do that,' said the Cat, `if you only walk
-long enough.'
-
- Alice felt that this could not be denied, so she tried another
-question. `What sort of people live about here?'
-
- `In THAT direction,' the Cat said, waving its right paw round,
-`lives a Hatter: and in THAT direction,' waving the other paw,
-`lives a March Hare. Visit either you like: they're both mad.'
-
- `But I don't want to go among mad people,' Alice remarked.
-
- `Oh, you can't help that,' said the Cat: `we're all mad here.
-I'm mad. You're mad.'
-
- `How do you know I'm mad?' said Alice.
-
- `You must be,' said the Cat, `or you wouldn't have come here.'
-
- Alice didn't think that proved it at all; however, she went on
-`And how do you know that you're mad?'
-
- `To begin with,' said the Cat, `a dog's not mad. You grant
-that?'
-
- `I suppose so,' said Alice.
-
- `Well, then,' the Cat went on, `you see, a dog growls when it's
-angry, and wags its tail when it's pleased. Now I growl when I'm
-pleased, and wag my tail when I'm angry. Therefore I'm mad.'
-
- `I call it purring, not growling,' said Alice.
-
- `Call it what you like,' said the Cat. `Do you play croquet
-with the Queen to-day?'
-
- `I should like it very much,' said Alice, `but I haven't been
-invited yet.'
-
- `You'll see me there,' said the Cat, and vanished.
-
- Alice was not much surprised at this, she was getting so used
-to queer things happening. While she was looking at the place
-where it had been, it suddenly appeared again.
-
- `By-the-bye, what became of the baby?' said the Cat. `I'd
-nearly forgotten to ask.'
-
- `It turned into a pig,' Alice quietly said, just as if it had
-come back in a natural way.
-
- `I thought it would,' said the Cat, and vanished again.
-
- Alice waited a little, half expecting to see it again, but it
-did not appear, and after a minute or two she walked on in the
-direction in which the March Hare was said to live. `I've seen
-hatters before,' she said to herself; `the March Hare will be
-much the most interesting, and perhaps as this is May it won't be
-raving mad--at least not so mad as it was in March.' As she said
-this, she looked up, and there was the Cat again, sitting on a
-branch of a tree.
-
- `Did you say pig, or fig?' said the Cat.
-
- `I said pig,' replied Alice; `and I wish you wouldn't keep
-appearing and vanishing so suddenly: you make one quite giddy.'
-
- `All right,' said the Cat; and this time it vanished quite
-slowly, beginning with the end of the tail, and ending with the
-grin, which remained some time after the rest of it had gone.
-
- `Well! I've often seen a cat without a grin,' thought Alice;
-`but a grin without a cat! It's the most curious thing I ever
-say in my life!'
-
- She had not gone much farther before she came in sight of the
-house of the March Hare: she thought it must be the right house,
-because the chimneys were shaped like ears and the roof was
-thatched with fur. It was so large a house, that she did not
-like to go nearer till she had nibbled some more of the lefthand
-bit of mushroom, and raised herself to about two feet high: even
-then she walked up towards it rather timidly, saying to herself
-`Suppose it should be raving mad after all! I almost wish I'd
-gone to see the Hatter instead!'
-
-
-
- CHAPTER VII
-
- A Mad Tea-Party
-
-
- There was a table set out under a tree in front of the house,
-and the March Hare and the Hatter were having tea at it: a
-Dormouse was sitting between them, fast asleep, and the other two
-were using it as a cushion, resting their elbows on it, and the
-talking over its head. `Very uncomfortable for the Dormouse,'
-thought Alice; `only, as it's asleep, I suppose it doesn't mind.'
-
- The table was a large one, but the three were all crowded
-together at one corner of it: `No room! No room!' they cried
-out when they saw Alice coming. `There's PLENTY of room!' said
-Alice indignantly, and she sat down in a large arm-chair at one
-end of the table.
-
- `Have some wine,' the March Hare said in an encouraging tone.
-
- Alice looked all round the table, but there was nothing on it
-but tea. `I don't see any wine,' she remarked.
-
- `There isn't any,' said the March Hare.
-
- `Then it wasn't very civil of you to offer it,' said Alice
-angrily.
-
- `It wasn't very civil of you to sit down without being
-invited,' said the March Hare.
-
- `I didn't know it was YOUR table,' said Alice; `it's laid for a
-great many more than three.'
-
- `Your hair wants cutting,' said the Hatter. He had been
-looking at Alice for some time with great curiosity, and this was
-his first speech.
-
- `You should learn not to make personal remarks,' Alice said
-with some severity; `it's very rude.'
-
- The Hatter opened his eyes very wide on hearing this; but all
-he SAID was, `Why is a raven like a writing-desk?'
-
- `Come, we shall have some fun now!' thought Alice. `I'm glad
-they've begun asking riddles.--I believe I can guess that,' she
-added aloud.
-
- `Do you mean that you think you can find out the answer to it?'
-said the March Hare.
-
- `Exactly so,' said Alice.
-
- `Then you should say what you mean,' the March Hare went on.
-
- `I do,' Alice hastily replied; `at least--at least I mean what
-I say--that's the same thing, you know.'
-
- `Not the same thing a bit!' said the Hatter. `You might just
-as well say that "I see what I eat" is the same thing as "I eat
-what I see"!'
-
- `You might just as well say,' added the March Hare, `that "I
-like what I get" is the same thing as "I get what I like"!'
-
- `You might just as well say,' added the Dormouse, who seemed to
-be talking in his sleep, `that "I breathe when I sleep" is the
-same thing as "I sleep when I breathe"!'
-
- `It IS the same thing with you,' said the Hatter, and here the
-conversation dropped, and the party sat silent for a minute,
-while Alice thought over all she could remember about ravens and
-writing-desks, which wasn't much.
-
- The Hatter was the first to break the silence. `What day of
-the month is it?' he said, turning to Alice: he had taken his
-watch out of his pocket, and was looking at it uneasily, shaking
-it every now and then, and holding it to his ear.
-
- Alice considered a little, and then said `The fourth.'
-
- `Two days wrong!' sighed the Hatter. `I told you butter
-wouldn't suit the works!' he added looking angrily at the March
-Hare.
-
- `It was the BEST butter,' the March Hare meekly replied.
-
- `Yes, but some crumbs must have got in as well,' the Hatter
-grumbled: `you shouldn't have put it in with the bread-knife.'
-
- The March Hare took the watch and looked at it gloomily: then
-he dipped it into his cup of tea, and looked at it again: but he
-could think of nothing better to say than his first remark, `It
-was the BEST butter, you know.'
-
- Alice had been looking over his shoulder with some curiosity.
-`What a funny watch!' she remarked. `It tells the day of the
-month, and doesn't tell what o'clock it is!'
-
- `Why should it?' muttered the Hatter. `Does YOUR watch tell
-you what year it is?'
-
- `Of course not,' Alice replied very readily: `but that's
-because it stays the same year for such a long time together.'
-
- `Which is just the case with MINE,' said the Hatter.
-
- Alice felt dreadfully puzzled. The Hatter's remark seemed to
-have no sort of meaning in it, and yet it was certainly English.
-`I don't quite understand you,' she said, as politely as she
-could.
-
- `The Dormouse is asleep again,' said the Hatter, and he poured
-a little hot tea upon its nose.
-
- The Dormouse shook its head impatiently, and said, without
-opening its eyes, `Of course, of course; just what I was going to
-remark myself.'
-
- `Have you guessed the riddle yet?' the Hatter said, turning to
-Alice again.
-
- `No, I give it up,' Alice replied: `what's the answer?'
-
- `I haven't the slightest idea,' said the Hatter.
-
- `Nor I,' said the March Hare.
-
- Alice sighed wearily. `I think you might do something better
-with the time,' she said, `than waste it in asking riddles that
-have no answers.'
-
- `If you knew Time as well as I do,' said the Hatter, `you
-wouldn't talk about wasting IT. It's HIM.'
-
- `I don't know what you mean,' said Alice.
-
- `Of course you don't!' the Hatter said, tossing his head
-contemptuously. `I dare say you never even spoke to Time!'
-
- `Perhaps not,' Alice cautiously replied: `but I know I have to
-beat time when I learn music.'
-
- `Ah! that accounts for it,' said the Hatter. `He won't stand
-beating. Now, if you only kept on good terms with him, he'd do
-almost anything you liked with the clock. For instance, suppose
-it were nine o'clock in the morning, just time to begin lessons:
-you'd only have to whisper a hint to Time, and round goes the
-clock in a twinkling! Half-past one, time for dinner!'
-
- (`I only wish it was,' the March Hare said to itself in a
-whisper.)
-
- `That would be grand, certainly,' said Alice thoughtfully:
-`but then--I shouldn't be hungry for it, you know.'
-
- `Not at first, perhaps,' said the Hatter: `but you could keep
-it to half-past one as long as you liked.'
-
- `Is that the way YOU manage?' Alice asked.
-
- The Hatter shook his head mournfully. `Not I!' he replied.
-`We quarrelled last March--just before HE went mad, you know--'
-(pointing with his tea spoon at the March Hare,) `--it was at the
-great concert given by the Queen of Hearts, and I had to sing
-
- "Twinkle, twinkle, little bat!
- How I wonder what you're at!"
-
-You know the song, perhaps?'
-
- `I've heard something like it,' said Alice.
-
- `It goes on, you know,' the Hatter continued, `in this way:--
-
- "Up above the world you fly,
- Like a tea-tray in the sky.
- Twinkle, twinkle--"'
-
-Here the Dormouse shook itself, and began singing in its sleep
-`Twinkle, twinkle, twinkle, twinkle--' and went on so long that
-they had to pinch it to make it stop.
-
- `Well, I'd hardly finished the first verse,' said the Hatter,
-`when the Queen jumped up and bawled out, "He's murdering the
-time! Off with his head!"'
-
- `How dreadfully savage!' exclaimed Alice.
-
- `And ever since that,' the Hatter went on in a mournful tone,
-`he won't do a thing I ask! It's always six o'clock now.'
-
- A bright idea came into Alice's head. `Is that the reason so
-many tea-things are put out here?' she asked.
-
- `Yes, that's it,' said the Hatter with a sigh: `it's always
-tea-time, and we've no time to wash the things between whiles.'
-
- `Then you keep moving round, I suppose?' said Alice.
-
- `Exactly so,' said the Hatter: `as the things get used up.'
-
- `But what happens when you come to the beginning again?' Alice
-ventured to ask.
-
- `Suppose we change the subject,' the March Hare interrupted,
-yawning. `I'm getting tired of this. I vote the young lady
-tells us a story.'
-
- `I'm afraid I don't know one,' said Alice, rather alarmed at
-the proposal.
-
- `Then the Dormouse shall!' they both cried. `Wake up,
-Dormouse!' And they pinched it on both sides at once.
-
- The Dormouse slowly opened his eyes. `I wasn't asleep,' he
-said in a hoarse, feeble voice: `I heard every word you fellows
-were saying.'
-
- `Tell us a story!' said the March Hare.
-
- `Yes, please do!' pleaded Alice.
-
- `And be quick about it,' added the Hatter, `or you'll be asleep
-again before it's done.'
-
- `Once upon a time there were three little sisters,' the
-Dormouse began in a great hurry; `and their names were Elsie,
-Lacie, and Tillie; and they lived at the bottom of a well--'
-
- `What did they live on?' said Alice, who always took a great
-interest in questions of eating and drinking.
-
- `They lived on treacle,' said the Dormouse, after thinking a
-minute or two.
-
- `They couldn't have done that, you know,' Alice gently
-remarked; `they'd have been ill.'
-
- `So they were,' said the Dormouse; `VERY ill.'
-
- Alice tried to fancy to herself what such an extraordinary ways
-of living would be like, but it puzzled her too much, so she went
-on: `But why did they live at the bottom of a well?'
-
- `Take some more tea,' the March Hare said to Alice, very
-earnestly.
-
- `I've had nothing yet,' Alice replied in an offended tone, `so
-I can't take more.'
-
- `You mean you can't take LESS,' said the Hatter: `it's very
-easy to take MORE than nothing.'
-
- `Nobody asked YOUR opinion,' said Alice.
-
- `Who's making personal remarks now?' the Hatter asked
-triumphantly.
-
- Alice did not quite know what to say to this: so she helped
-herself to some tea and bread-and-butter, and then turned to the
-Dormouse, and repeated her question. `Why did they live at the
-bottom of a well?'
-
- The Dormouse again took a minute or two to think about it, and
-then said, `It was a treacle-well.'
-
- `There's no such thing!' Alice was beginning very angrily, but
-the Hatter and the March Hare went `Sh! sh!' and the Dormouse
-sulkily remarked, `If you can't be civil, you'd better finish the
-story for yourself.'
-
- `No, please go on!' Alice said very humbly; `I won't interrupt
-again. I dare say there may be ONE.'
-
- `One, indeed!' said the Dormouse indignantly. However, he
-consented to go on. `And so these three little sisters--they
-were learning to draw, you know--'
-
- `What did they draw?' said Alice, quite forgetting her promise.
-
- `Treacle,' said the Dormouse, without considering at all this
-time.
-
- `I want a clean cup,' interrupted the Hatter: `let's all move
-one place on.'
-
- He moved on as he spoke, and the Dormouse followed him: the
-March Hare moved into the Dormouse's place, and Alice rather
-unwillingly took the place of the March Hare. The Hatter was the
-only one who got any advantage from the change: and Alice was a
-good deal worse off than before, as the March Hare had just upset
-the milk-jug into his plate.
-
- Alice did not wish to offend the Dormouse again, so she began
-very cautiously: `But I don't understand. Where did they draw
-the treacle from?'
-
- `You can draw water out of a water-well,' said the Hatter; `so
-I should think you could draw treacle out of a treacle-well--eh,
-stupid?'
-
- `But they were IN the well,' Alice said to the Dormouse, not
-choosing to notice this last remark.
-
- `Of course they were', said the Dormouse; `--well in.'
-
- This answer so confused poor Alice, that she let the Dormouse
-go on for some time without interrupting it.
-
- `They were learning to draw,' the Dormouse went on, yawning and
-rubbing its eyes, for it was getting very sleep
<TRUNCATED>
[30/51] [partial] orc git commit: ORC-204 Update and use CMake
External Project to build C++ compression libraries.
Posted by om...@apache.org.
http://git-wip-us.apache.org/repos/asf/orc/blob/590245a0/c++/libs/snappy-1.1.2/testdata/paper-100k.pdf
----------------------------------------------------------------------
diff --git a/c++/libs/snappy-1.1.2/testdata/paper-100k.pdf b/c++/libs/snappy-1.1.2/testdata/paper-100k.pdf
deleted file mode 100644
index b3325e4..0000000
--- a/c++/libs/snappy-1.1.2/testdata/paper-100k.pdf
+++ /dev/null
@@ -1,598 +0,0 @@
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=10 M=100 Y=50 K=0</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>10.000002</xmpG:cyan>
- <xmpG:magenta>100.000000</xmpG:magenta>
- <xmpG:yellow>50.000000</xmpG:yellow>
- <xmpG:black>0.000000</xmpG:black>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=0 M=95 Y=20 K=0</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>0.000000</xmpG:cyan>
- <xmpG:magenta>94.999999</xmpG:magenta>
- <xmpG:yellow>19.999999</xmpG:yellow>
- <xmpG:black>0.000000</xmpG:black>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=25 M=25 Y=40 K=0</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>25.000000</xmpG:cyan>
- <xmpG:magenta>25.000000</xmpG:magenta>
- <xmpG:yellow>39.999998</xmpG:yellow>
- <xmpG:black>0.000000</xmpG:black>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=40 M=45 Y=50 K=5</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>39.999998</xmpG:cyan>
- <xmpG:magenta>44.999999</xmpG:magenta>
- <xmpG:yellow>50.000000</xmpG:yellow>
- <xmpG:black>5.000001</xmpG:black>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=50 M=50 Y=60 K=25</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>50.000000</xmpG:cyan>
- <xmpG:magenta>50.000000</xmpG:magenta>
- <xmpG:yellow>60.000002</xmpG:yellow>
- <xmpG:black>25.000000</xmpG:black>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=55 M=60 Y=65 K=40</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>55.000001</xmpG:cyan>
- <xmpG:magenta>60.000002</xmpG:magenta>
- <xmpG:yellow>64.999998</xmpG:yellow>
- <xmpG:black>39.999998</xmpG:black>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=25 M=40 Y=65 K=0</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>25.000000</xmpG:cyan>
- <xmpG:magenta>39.999998</xmpG:magenta>
- <xmpG:yellow>64.999998</xmpG:yellow>
- <xmpG:black>0.000000</xmpG:black>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=30 M=50 Y=75 K=10</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>30.000001</xmpG:cyan>
- <xmpG:magenta>50.000000</xmpG:magenta>
- <xmpG:yellow>75.000000</xmpG:yellow>
- <xmpG:black>10.000002</xmpG:black>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=35 M=60 Y=80 K=25</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>35.000002</xmpG:cyan>
- <xmpG:magenta>60.000002</xmpG:magenta>
- <xmpG:yellow>80.000001</xmpG:yellow>
- <xmpG:black>25.000000</xmpG:black>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=40 M=65 Y=90 K=35</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>39.999998</xmpG:cyan>
- <xmpG:magenta>64.999998</xmpG:magenta>
- <xmpG:yellow>90.000004</xmpG:yellow>
- <xmpG:black>35.000002</xmpG:black>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=40 M=70 Y=100 K=50</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>39.999998</xmpG:cyan>
- <xmpG:magenta>69.999999</xmpG:magenta>
- <xmpG:yellow>100.000000</xmpG:yellow>
- <xmpG:black>50.000000</xmpG:black>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=50 M=70 Y=80 K=70</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>50.000000</xmpG:cyan>
- <xmpG:magenta>69.999999</xmpG:magenta>
- <xmpG:yellow>80.000001</xmpG:yellow>
- <xmpG:black>69.999999</xmpG:black>
- </rdf:li>
- </rdf:Seq>
- </xmpG:Colorants>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:groupName>Grays</xmpG:groupName>
- <xmpG:groupType>1</xmpG:groupType>
- <xmpG:Colorants>
- <rdf:Seq>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=0 M=0 Y=0 K=100</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>0.000000</xmpG:cyan>
- <xmpG:magenta>0.000000</xmpG:magenta>
- <xmpG:yellow>0.000000</xmpG:yellow>
- <xmpG:black>100.000000</xmpG:black>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=0 M=0 Y=0 K=90</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>0.000000</xmpG:cyan>
- <xmpG:magenta>0.000000</xmpG:magenta>
- <xmpG:yellow>0.000000</xmpG:yellow>
- <xmpG:black>89.999402</xmpG:black>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=0 M=0 Y=0 K=80</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>0.000000</xmpG:cyan>
- <xmpG:magenta>0.000000</xmpG:magenta>
- <xmpG:yellow>0.000000</xmpG:yellow>
- <xmpG:black>79.998797</xmpG:black>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=0 M=0 Y=0 K=70</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>0.000000</xmpG:cyan>
- <xmpG:magenta>0.000000</xmpG:magenta>
- <xmpG:yellow>0.000000</xmpG:yellow>
- <xmpG:black>69.999701</xmpG:black>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=0 M=0 Y=0 K=60</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>0.000000</xmpG:cyan>
- <xmpG:magenta>0.000000</xmpG:magenta>
- <xmpG:yellow>0.000000</xmpG:yellow>
- <xmpG:black>59.999102</xmpG:black>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=0 M=0 Y=0 K=50</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>0.000000</xmpG:cyan>
- <xmpG:magenta>0.000000</xmpG:magenta>
- <xmpG:yellow>0.000000</xmpG:yellow>
- <xmpG:black>50.000000</xmpG:black>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=0 M=0 Y=0 K=40</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>0.000000</xmpG:cyan>
- <xmpG:magenta>0.000000</xmpG:magenta>
- <xmpG:yellow>0.000000</xmpG:yellow>
- <xmpG:black>39.999402</xmpG:black>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=0 M=0 Y=0 K=30</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>0.000000</xmpG:cyan>
- <xmpG:magenta>0.000000</xmpG:magenta>
- <xmpG:yellow>0.000000</xmpG:yellow>
- <xmpG:black>29.998803</xmpG:black>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=0 M=0 Y=0 K=20</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>0.000000</xmpG:cyan>
- <xmpG:magenta>0.000000</xmpG:magenta>
- <xmpG:yellow>0.000000</xmpG:yellow>
- <xmpG:black>19.999701</xmpG:black>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=0 M=0 Y=0 K=10</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>0.000000</xmpG:cyan>
- <xmpG:magenta>0.000000</xmpG:magenta>
- <xmpG:yellow>0.000000</xmpG:yellow>
- <xmpG:black>9.999102</xmpG:black>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=0 M=0 Y=0 K=5</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>0.000000</xmpG:cyan>
- <xmpG:magenta>0.000000</xmpG:magenta>
- <xmpG:yellow>0.000000</xmpG:yellow>
- <xmpG:black>4.998803</xmpG:black>
- </rdf:li>
- </rdf:Seq>
- </xmpG:Colorants>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:groupName>Brights</xmpG:groupName>
- <xmpG:groupType>1</xmpG:groupType>
- <xmpG:Colorants>
- <rdf:Seq>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=0 M=100 Y=100 K=0</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>0.000000</xmpG:cyan>
- <xmpG:magenta>100.000000</xmpG:magenta>
- <xmpG:yellow>100.000000</xmpG:yellow>
- <xmpG:black>0.000000</xmpG:black>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=0 M=75 Y=100 K=0</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>0.000000</xmpG:cyan>
- <xmpG:magenta>75.000000</xmpG:magenta>
- <xmpG:yellow>100.000000</xmpG:yellow>
- <xmpG:black>0.000000</xmpG:black>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=0 M=10 Y=95 K=0</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>0.000000</xmpG:cyan>
- <xmpG:magenta>10.000002</xmpG:magenta>
- <xmpG:yellow>94.999999</xmpG:yellow>
- <xmpG:black>0.000000</xmpG:black>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=85 M=10 Y=100 K=0</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>84.999996</xmpG:cyan>
- <xmpG:magenta>10.000002</xmpG:magenta>
- <xmpG:yellow>100.000000</xmpG:yellow>
- <xmpG:black>0.000000</xmpG:black>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=100 M=90 Y=0 K=0</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>100.000000</xmpG:cyan>
- <xmpG:magenta>90.000004</xmpG:magenta>
- <xmpG:yellow>0.000000</xmpG:yellow>
- <xmpG:black>0.000000</xmpG:black>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <xmpG:swatchName>C=60 M=90 Y=0 K=0</xmpG:swatchName>
- <xmpG:mode>CMYK</xmpG:mode>
- <xmpG:type>PROCESS</xmpG:type>
- <xmpG:cyan>60.000002</xmpG:cyan>
- <xmpG:magenta>90.000004</xmpG:magenta>
- <xmpG:yellow>0.003099</xmpG:yellow>
- <xmpG:black>0.003099</xmpG:black>
- </rdf:li>
- </rdf:Seq>
- </xmpG:Colorants>
- </rdf:li>
- </rdf:Seq>
- </xmpTPg:SwatchGroups>
- </rdf:Description>
- <rdf:Description rdf:about=""
- xmlns:pdf="http://ns.adobe.com/pdf/1.3/">
- <pdf:Producer>Adobe PDF library 9.00</pdf:Producer>
- </rdf:Description>
- </rdf:RDF>
-</x:xmpmeta>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<?xpacket end="w"?>
-endstream
endobj
145 0 obj<</Metadata 144 0 R>>
endobj
1 0 obj<</Contents 3 0 R/Type/Page/Parent 102 0 R/Rotate 0/MediaBox[0 0 612.28302 790.866028]/CropBox[0 0 612.28302 790.866028]/Resources 2 0 R>>
endobj
2 0 obj<</ColorSpace<</Cs8 117 0 R>>/Font<</F2 122 0 R/F3 121 0 R/F6 118 0 R/F7 125 0 R/F8 56 0 R/F9 70 0 R/F10 71 0 R/F11 61 0 R/F12 65 0 R/F13 72 0 R>>/ProcSet[/PDF/Text]/ExtGState<</GS1 113 0 R>>>>
endobj
3 0 obj<</Length 8934/Filter/FlateDecode>>stream
-hޔ[Ms�F���W�n�m U( s��e{����kjw�`7�ƨhhҜ�_������e�&�rl(B��G��2��ˏ��_o����ͷ�|�H.>)V�s�"����Wq�\X��إ�ob������5�{|�)��^��xy��l�D�]�E~g�*�vM����_Y���Aڨjq���ݷ?�b�*�]�P��W�r���U��m��?��04]���\�}������\�ʲ��NVI�d=�ɼ�u��p6w���N~�re�ߎU;6c565�2�c��v��u�
g����S��3�>_��D04�����Qw�#�*����ׇ}���L�%���m��_9f�����0���^YצY��N�9n�ps�e)�9����&�|��O�"��~l����ms��=2yT��ǾZ?��'�=�V�W�;���`L)�T0�X�A4&��� q'���IGJd�שŷ�C7bb�1Q����t�rJ1E��\ES�ñ�R!�"��d�wǝ
-?������G��q� p�ۢ��_�⧑�}}؉��+.�D��A����ɤ$&��
-*�v�o��:U�T�i�͑ks���?�y'��V�^4�m]O߽�A���$x�I;#�����4�.|���ý�o���Q�w�v�K�,ă�2kd�6�X� �,��4#.C͛� �]��=�F6��w��QD1�{~۴�(�}��E��K_�w�*hZ@Ct�EA�g�/�)rj���J��чvS��\a�#�xh�G��F��ؓ�������}l��cY�h�)����(��ǍT��N�������Sb����[,ʔ�W%�ʣMswW�/S2���X�G�O�����5�����r>���,�����b`'�%����E,B�>�|$�G0�,1%�@���T/�2�;�,�BQC)e���]�M�R�ض�~�Rm�[Q����
-Pc��]�Q�kO�NF��J_����ɇ��z{θ�C�n�5���<��e���H����Q`S�u/JCSI�c��v�f�F�M����as֣�pΪ?���²�y�����'�#����;�n�i*s��#�}����O������m�6�����Y��^��z�
.R`c߭a�Xg|_��~��"��hj�@��ͼ�,���=qr��f�ή�¥��40�P��u}��`��@4��;�zR�ϗ�{���u, "�M��O�&Sԛ&���"a�*W`��"I�F$�,�b�O���s=<��#j�����{�~�r�-"�"� .�YF}V$�[�'=ù���J�}�J�Z�g��6`v���&v����e���z|$��lUr���iڃ�]�����=X �3M7���-�uծ����Q/�1y��8���8��@���v����p���:c��Ș���ei$��eTW=]C
-��]��E��;�Ȼp�~�
-�U{��Q*0�5�.�xr"�C��뻡;l�]u���$�JĘ�C�8��22�?����@�Hr��4A����$[��Z��3��X+!M���?86�[T��>�y�ٜh�Ұq �P�$��
-�Y�p%��b�#X�5�|�b�^Q*B;�N� ���J:��3R�������*<a_o���j�"� ���v�w�� T�xM�/Gt�Rf���w��#�T։�λ�NБK�"� �m��0��������使��Qɽ�t�A �mSj���R.���ij��s��NR�j���]��J���.wŽ����S����Lm���Zt�J�fT3^� �dS���X�F-�B��@��'�+N��K��}����8���P�x�`t}��HM[�Q}��9��f4�]�YR�4{$~�Sd�ȱx(��3�}���ÞPK��?��
W�����`�q"�W�����u�ݴ,�ם�]<��2��.\�%/m�
�f�-T����|Д�1tb�Ot���֡�3� �l9��2f�����0k]��a#��J�ʇǾ�=p�<�1$�� ��hD���G�-.8�Y��p0��A?nu�g�<_�;�"�ES���w������2�Lt�Tl��<��p�` v��1Sd�j'��Y�b
Ɂ�U�t�!l��3,�f|:�ß���j�%�j�ANAiW����
-U�v���q�Qk�E�������dc����%`��l%��R�{��J�?o� 8-㹟�D��_/ L�W��y��� ���1U#R�]q�;$ƺHX�9�H�D �z��I��\<Z"�ml���O�u��V�l*v\@�8����z��:/su�B��Ċ�Q�?��,��!��L^8d�"�%��IG-�=�K�\������Eh�Y��B ���0J�\x\+aJ�07�4>�ě9"�a���x�pNA
-�
-S�b'
�U�p�~t܅�6�C�s$��t�Wh�eޢ�+�h�q�,GF�IH��[W5�S�a<�D���X���Sq-�͘�1��+�"G[���!&f,ݭp�g� ��|�����v0E�Q͝`ҎIYZ�)�+�S����wM��@�]����G\�ѵc�v[��C�?0�!�����8��C1R�<�*�����`yqY��!K5�_��q7�|�M ��QS�:�Y0�����Yu�Iaf>]"B���]�<-W�{0ps���涹�f^H�G��Ѹ����dV`)0�����YohjV�B�訅����aRpv�)��P���O����%���̹W�-%�~�ח >�-�@��e�\�:������+p�X���I��Rt/����'* ��O�.��XIMh=N`B����epxc�_���~��d�~����R��'%��W�(
&��o+,NyL'�$Rx�a9�KB��YXW�2���Ө�/0�,sJ�1yX>(f$�W�(�J
-쇋��ÏD~�1R������Qg#�p��p�2�:}R��HX0���=
�#�1p��:��]��c���Q3&�s�d����̤j����oF?�����8�V&���Ӓ���Snޝ#��:t�b0�2.�����z��D-��; ��+,�=߃`�p��!jΰL��D]asɠ����F�c��T ��\0��>I/LPa�f���rF��
HK�ؙe(���O/�e��;ex~��Z�Y� �P���3c��d|��V�4�dOЇ�)��Z~F�$�֕K$tI��@[�Au�0\�d���Fd��Z�s�j�?K ~�oX��&=x�����6U8�~.PTZ;@ �WaNCnu������P�(Ψ-�&�fM��Ȳ�!<���4�l�����mC
���5c��^A�֍�Y�1xU_��2�g�t�i��Mc��%='0�>�ⷢ�ړuWHh*ZC�w3�� ��H���VwA��к�a H�����*^��I�ؽSĮ�l֫p*>�Q�!:M֥��Ml������ղ"r�9�1LA��D�m]X؆�I�)�W�'Sz�S4CB
�lĉ��&6�q�j�Ȃ��:�
��S��H+z�� �G?_KtɌb~���>4=t�U���
*�8g2a���j�D��&���_ߩB����{�
-�
�g�B$E�ijM�t|G
-�Ǩ>#!�8�JM:�>��3�w��y�.�#�����3��:0Q�I�.��8k�"t�N�Z}�G���%@i"�ܷ�L����5)��w?/�>�+�$�.&��N��3ꔈ{[��-R
韹�n>�u��e��P 4~�z���Z��](�i���~�|�M��
6A8�*����;�:��M����h�!��GͰ���#;�B����jP� D�a��h��S~��ȗwjyǡQ�|����E���Q���'ࢳ��X
-�|J1c@��"�A�'c�eI3Ȋ�Z�G�#s>]�ME��n�,��R\�FuNT':�n���j�D�J�XI���gc��q���m�� 7�̰���5�zڎDy�������F�AN;�etS?L���م1g��B����B�@��3V̶���u�D�|����o�nh��A�JF*��gy�hL���V����V�Bb�eh�����ה�|�0*n7AHRiD���H��§�*�H,puɢ�)?�e���;����<h�).x�A�7�0z]��jߍJ���!<?�Z<�6�q��0W��ɢ��gt��l��G��&� �8�8g�f_�]�<Y:�[9�$�@��������V��X,�"���H2g��ip�~W���Ը�<��cŢyIպ��O�|Y�+�
-*Tnn��qO�i�&� b$q��;��������Ҩ�b.���X%8��b�HJ����0
P-PJ!$��R�¼bk�Fs/��|�A�2�b��!���,���M��������~�
-Iy|� PPu9U�zF�Z5ε� Cr6J��n�/�����x=�H�!�c<��Q�����U:�S^�&7���onBYw��� s}W��QY�t��a����^A�o�/r
-5y��h"��1/`��2g�&�Z���O�A�[5H�RA
-(O ��-�E��2�n����&'i����tr�~�E�")��#g)�k��
-��@�mS+��U�.j��"�P�����{��0z�'e��=MP�S�+5�K
-���Q��F;��`����!���h'pq*bY ��P{bـX�!�0[��'�ȱ��3�-sj�rM�:�7����}i;�t�;2�jݽ�� b�͜��~�S��&��h�i��\./�Z�S�䓊Z�a���f �n����H��y�v�{�?�S���#ܓ#2��v������N�%����!�;Nܗ��s��}�.�LxFf�x�a/��9��`C���O��(�Ջ�|F�8�P��,���2�<b�$����Cj�%��qr��
-V��ѨB�6�C�� +!ԙ�.�{
-��
��(
-���2�H�
-��Vr}PU��}*p�Ri��K��ٳc"l��+��8&�y���ݨDo��i�@hr-�u8Sd)�eW��D
-�� ��H���MZ�s
�X�U;�cb��C��R��$�L��������,�:�Ue�Sts��s���
��O��1]dX#�d?
li\�I�Q��
- T�4>55����ܬ�_���8�3��S�Y�Mو�t��m�4�BXI�ގA���<.}��"!�.����d>?3Aq���̋x�H�㗊�t} lh*Q��LP�3�C{�A+ͥ�[ٲ��������z'�w��/���Ki����so�E������$���(�
-{gi����0s�
-��I�������8�48�'e��ŪLL"��\Fx�_�BO�!���'o�=�`$�j��̵�4�ݩ�#,$Y��������۵��R��G�,|{`����WlЌ��/���p����a՚�%�/�����[�$�G��R�"/�A�i�;F���6䔒+um`P��,���k닀��������^T�t��fT��'��)�{.�\�Ur!|��O��
-���S����v��*
-
���Ő!Xw�r�F�,����Xѕvv�h�0z
+�'wJ)s²���]h��zo�/1#��A��-��+�/��6�=�n��f�ݘ`7���t��刏/�-���(������e��>Ίe�h"�AO��'���y��m(�K@�6�~J2U#�
-��<�↲���r�Jq����[�
$���o0-�xf>f�A�Q'n�C*�9��̤�O����VJ|�v���?2*��(
X��d�\��0)IP���sf��O����.�7�'��N�
-����8�ltG֚���,̜���K�d��G��dO�H^e1g���p�5�%Ƌ$�$�A�/9hoZK��`_Z%S�B�PV���[�Z��P7��/����wV�S6p�O���Qu�l6�ה ��F�ak���'d�yv��yi��*m4,��>�Ѡ�G]���� 9D7�"��*�霨�W�A�h8�D\��1�q�u�51�c���u�Y���y�תk��̌�ݱ+ezu��ݡ80T,�������J���*y�+��L^5��F斵��z�V1�ܛg���e�u�L[yz��#䷐�c��A�m���G��D��L-d>��{[sG��ɕ,��5y��i5,�iK������v7e��W
-�ĺ��i��[v���x~��e@Up���RDO���Uh��V�F;�uCǾ4�&��!�ּ�3�,�3xe�(�CH�ϵ����,�{ˢj ��As�J�6ǯB��O����+�}��ɯp9)��e�;�)�g���e��r�b�Z�Ñ7N}ǣ4)[V~��暋��V�@�����P?�e���_~�
-�%��_�� ��-wQ[��l���E�6b٤��jc{뫾��s����L�2 =���Z%ˑH<k!+c5��Z�}1�њ3�@K @��5g!2n*"LLٰ8�����1�1�IL������4��kjr���oʃ�(�g��
U���{X�e��0��U`ˆ��g�m�)�m��v�?�>0��i4>v:�26�
-#�Di�y�
-m��8#�u�K���h��K#ziT�\���=e̽�ݲ��%�>�'o?���ި'�{H4�y�'�����L�=���އx������Nj�j��1|}�c���^i�������tB�}�[�~���V�;-9�l��Nï�[p�#[r�ٖ�����s�n!��O�Et�p�`�����|v+b��E�R��yoXT�`��z�Uw(#�E���R�m��3O��+��-��BoU`���{�m���U��j�0�vU0�{�����4A�#x/kqC8��&�(��/^�s���Y�g2��"@gr���6����6�����L9�9�.o�K��MP�Wt�u)="k��RfH��k���o�Q�ΤļB[�Hi}?�q�sS��g����x�Oh����S )�C��a)�ԺY�:�k=�ƱY��ї".�S��ar/{�DҦL�t:�
h�Ml���ڲKL��bxD����A�/��'�V��#�_l��wŨ�{�-��P3����a�����09�p�,Ɯ,��sՏ�;�+�W!�E��
�� _Eh��ԭ�D6�v�$�tx�d���&�w�c�my82�+p��FO)�W%_6�A�gY�<�U�*<n�����3�M�ni5ӽ�q�qb���p}�
K�W�g��[�PuW��X�li�
-&���~&
.X�9wu�����K!^���a��#I�<���s�'�����V����"�՚���whגo��P����?K1�!�d�����D�����!�0���Q. ݷ�n@��)`���-�
���M<pR��i�OE�
-����f�(<�IǨ�C� <ۺ��~S=7�W��
�����Xbѕ��y���FT�~�jl����Ec��!���B���� �+ƫ��h�o*�cZ]6�ܬ��)�!oB9�jv�A�����r�k�.�d)���p���kՎ�q����2�o�u�h���tT�!N��]�Ӌ��?����P\���Uv1��7�;�/laW���3OLr�f�*N�E_��{��ǯ��BY!ͳ��dKߊ�@�c�G���X�'�n�{��z����0�˚��$�kS-}[�D3Z�0%,?��p�w1���� ��� 'Eg�ە`�z�Vo$џ���Ѻ�mK�D�w��I엤����G���`v�´�Q[�|"��2 �g��`WG�l��e�gmٻ-⬛x�9���c�����yZ���w�'�k��Ϸ�ɠX�AN�4��mʹz���y4�n�/ZX��Y��'��g�@H�� �p
~k!"�����#���I�+}���"S�.A��w-��3\���~l̮�a였5(~u�1 �u%� ;���1(��7�
n[fD�A����ۊ�d��'���K �Ym���hh$�5�1�p';�X��{����({�O���I�6�C�9'�Q�Jt��{�Kl&B��de���������V��e%�H=�V��˟<<).L�}�2A
-\�O���<�mթ&P��j�BXd`����rq~V���&��Qݕ��ݮ�_��Id7L��`�&K4� ��*m��Ξu���!O��!kZI�V�z��`i2��É[g�'��a\<��e�X��R�<�����?y ���ǁ�J8�f�s��qxY�f9{��W�*�o9��.
� ��9�v_��f�}�q�@齞v6ee�%�f�guiPPV�y$[w e���>:p|+�<����t}8�,!e����4@���R\s!{�>�%!�e
-������0�Zw�?�O~c�=L"R�'mSQhk��Y��9
-��t���>��}��T-�w�S0k�ͻ�G������K��V6U�g���l����"�c�OG�Q��e��td=��yy�<�*�J-V�ީ�oq� z[�����X@4�Va`�) ��?��-aoN`,���i����*�́����v6j��i�d���S�4D���� :Q����>��Z��l���Q]g���Y��"���b}$�� �P�#����q�c���iGY^;�;��aEv0��qಙ�ޕ����-�����^�J �d49[��aAr�]����vFMTQҨ8��vǾ�=2I��>V�l��;��Vy�g�;�����]��(�f���7#6v��7��[M �?o�} 2�
-���Cf�
`�
�sthC���BV.�]�XA�+Y��DZ�mG�'̇
���Li7���ӂF����ÿ��[����Ф���E���.e��Qu�?�姛��w��p9 �b˿���I�)�p6 �����:�A(?�c�Ǚ
-�tZzy]:���j�Z�M��i�X��e��������=ar�?`KhŇa� &ˤk��%��u��&e/�O� ��.�
-endstream
endobj
4 0 obj<</Contents 6 0 R/Type/Page/Parent 102 0 R/Rotate 0/MediaBox[0 0 612.28302 790.866028]/CropBox[0 0 612.28302 790.866028]/Resources 5 0 R>>
endobj
5 0 obj<</Font<</F3 121 0 R/F6 118 0 R/F7 125 0 R/F10 71 0 R/F11 61 0 R/F12 65 0 R/F13 72 0 R>>/ProcSet[/PDF/Text]/ExtGState<</GS1 113 0 R>>>>
endobj
6 0 obj<</Length 7551/Filter/FlateDecode>>stream
-h��[ے��q}�W�#0��.u�%)YT��][K>`z03�M =�a8��^�9Y�KO/I�eK�.���2O��ԯ��]��a�������7�M����'�r�x���Җ����ϋ�I3�������r�~��=�!��p��2�����0~S$�U��C^�?��O�u�Y�廦�o�����*ߔI��^e��&�0�W��"��5��I���n�ɓn_�K�������뷻.��ox��8��*����5~�x��*���'�v�1ˤ����﮾}�;Y�M�ɼ�|.�;�
^˓�Vfh���}�r���g,-O�2��ae��r5Ȝ����VF.���9�z�h�����L�"Z��I���L�����˱�܋y]C�#����Ś��蚚Z̷H,=��
-��=��-�.�!�n��mr�j|T&���U�b�!|���SU26�S2ɮ�Mx������u���Ve�������ˢ��3V��@�nw���A�n�L�R
��������܃��Ɉ.��G���Q��v �h���y
-��l{�J�f�U��[̢H���I�J�ϭl�3��Q�j�^Q7�����*�Ϗ�f�Ã(~^z��Ζ��WN�>4?�x�{�Lz�an2�p��X�3^)�B���b�ja�VUϹI��,��6���~S(�T"�#\�ˈ'N.r�����g�X7NF�b���X`�R�ĴѼ�ط�'��L���-ŎT^����u>���1����l y�OF�a�K*��!K�pE���q����U��c��a�A�[ƹ�>���o�,{�d~E�z�O�;$�ڎ�!5z�Д����;H[6y��yg�n:(�B�fr�˄� �S3]%��S��C��8�;7͜s�U�l��Z��eT�~���VX\|����Q�����|9Yu$���/�����IQ&]->7k��B�<D?ԉ6OnG���q����%/@���.O!�c=�h'��,�1�����)�r�(<��I��1m�&N ~� ��S�O=��J�%�����A�� �isZ��ng1��X�����%��=5�j�����vT�=��%jMm
-����g ���dɡ��lo!�ևQ�X����� ��hGQ�Wl�����J�4[�U7N*���Ꞙi�W�Z��6k$�Q�
�:ț�Z�h��)��USF���'�V�4���0qm���-f��=�J���>.k�3Mn~��7��q�c���Gh� �.��]�~��juk�������W���3�'��6- S
-0F(=8G;�qKk�ola����7�ۗ��x��~�|�( �e����vн�v'U��� ��N
J���;%���f�C=��Y�.�_����m��?1����Y
?f����Q���
J�Lr������O�A��͕`h����z��XE�o��Ȳp��"��N����F���K ˁ3oj�<C�)��Ə:v�����z�� V���4s�H���F��Ў�i�h���NP0�QA��'��ʋQ%_^����#�r�LA��w��U�m��Z�D'NF�d���5�g�NyX�?�)�C��J;���qǗM���A5w�w�5�29� �ċj����X+Ŷk�5������0*|�Q�@><�y8�o��AA�D�d6��v�y船L{�`� a���$=`�.�;JEA��N���T���^U�H�m�����K�{_ou��
-S*����͡C+�9��u��7�Z�
-s1@�4)Lj�{��?5*����<� g�z Bě�葾�����1e� ��jE<�Z��\&��¦�l )49�k�v5Om � r;��v�u��]��BX6y$��k��F�t���=��p�a�������qi��i���İT9p}eW�hT����S0^����8{��XG�D|��s��AO�0�}�d~�eQ�� /8�ix���]��e�K��?�dZn~8FF�� �����s#���cطnߩ�F,�p#QȓZh�e= �X���i������+1�v�٧_j�Y�v<۠����)�UKЈ+��<����� �Z3,?��v�At�X~�<I,�M̱��D�����7�]��F�02n?��z_��~j>��Ew�~���HT�)�&z����lE�^��P���9���(������NVE�n���QGP����7�Ë /.�����Ҙ�I�$A��ɇl�g�M�"��$�!�)���,�����T%�����>�����=�� lW.�_����B�
�X�y߃A9��DqGl9��n�[°�g�%�6y���Qj�ڝ"���@�@��H ~N���)56OI��?1�'���lt��"�k}BwChh�}��Qx��.z@��{�\e,�+��be��� �£P���� �A˜a^2�v���(��[|a���
-�[Q��vG��!�&��J���r��GsHy!�ɭRm<P-_���k 1��M&sT�}�b��l�q�ݨX^�[U}�@���%��t���eC��w�c͔\�B�'ƭ� j�.:P|����ך2Q���l���(�*+B+Þ8��N8���% Q���q�-Y
-pbڭ��>�/��<+�P��?�L�u�$��'<ܾ��Tf.`��r�BH�&F�h�R��3ڀ�Np�z���s� \�:��d�`�j�{�18�c1;���YL�1Üڧ&f���3y��bF�mx �'�#��3��ѽ�
�Y�'*�#yS�q9���t
G�(zh���ݵtܑ��qL�#F������d��,��p�&�5��B�QX��rb�^c�,כ�
-�p�4����N�dᎩ*n���K���[6]�1HI|����.\�d���E�!�;%�����A��t�ڔ����o��y��Suiֳ"N�� �2Ro����><R��D��O�V�P��)���������ܵO�xe5���sCR�e�k0o �����alQ��
V5��&����y�9rx��ڇ �f??���\m���⅀\��wwm��*
�Kֵd�}jt�OPq���i������2����j��*(��ЈY��t��f��/O��V�ӎ1?�4q�.U�\���^�hҽB�#S@�����������Ӛ�$��!s�$`�u�ʿr������
��S��)�U�ї�&�V���Lpm_���@u/�CTp~k<_�Ə�*�o�3�+��� ��y� @ ����".�>��#�-Ϭ��?��'��͕�7^�d��}8=<�J��W����Խ��� A �p)a|�a�5�!��2�>h�he��*�k$W{3��EMY2�<{J�������
�f�ﻱ�ݽ@P� 9ay�Hf*�EКMC
�zH�u&j~D�m��l�M����*�C7�k\ȃ�~x�u�A�n�:*~R��>�L�E���,��J��e�hGl1��$*���i�o�cW,�=���*E��vasB�c>GY|� 72�A� ����N��*
��]�7"�F���za��r
-�`������Zh�B\�&�_@�W�,�䫵G��yZF���́�
-�e %�ԙ���ȕ�:�_q�&���Ҡ���\�����������
��S�Hڵ6>��,�%�]NR���YY Kb���f�w[:^����I��[���L[`~�)�CY2�=+�$T����K^>�1���fV�h��3�>
-`���e���'���ke�Z�D�.)�S-�+�P�*�ڱ,���bsf�&���[�����0Q�b�GDž�3f�"�Tz�?.-g��E�,ÿ�q�6�:��Ҽ�D��`=<�6l�X�ܶ-c��+\6C,`�6�},��R/C��������6��E�����CV�>m�N1`-dnCLOê�?�-�?]C��Y.�"n"5,� �)�8�)�e7[%7�
-��%�s5lQ��rYx���Z,�"�p� � ?��9~�9��!`���R9r@�:�����M����4~@K`^!�A�l)���Omw ��L�8�h��@/�ok�ē����*��B�6���W���8ag*����Y̸9���A,g�aa�N�ч�K�y
-c�1��ٛG�6����f)J����'�^��N��a���@��=-�
-[w����I
`3�&"�BSݨ�S��iH�ܗ�h#Sc�ɦږŶ��>��m�ah��q%���qUHn�o��K5%����&�b'l1�}`�)�4���ʘ�� H�ݮ{���-?Z�>��(ﳼi,����Ʊ�%fH1�̾�)d4lc��Kg���Y�xa�� Ot�u�K{�W���Ƅm����}�uB�OI�/j��g/�$�Y��2��Η�Sh��P1e����v'����FM�،��ڜ�z`r~�plT��=�����1 ��G�43�"��et���P�A�V`�wK���e�V�}
-���W!X�)C�K�f��0`��#�R�����&4RB�.l ���71�
�j�*xބ����x���W{6ݮ|�'\D�⍦{�U��1$�����]��|�p���h��GL�3�-k�n��uP���o��T)ց�k91���p�)���t��,Vr[*6.�ck*�?��Q��`�<w�5�E`�Cz{��!Ȝ$a]E6�Z�ULt�ܲ�� 3>�Y\X��^y��Џh\�������ش��&�#�p���XV��z��=*���š~/�C"](��ɿ��F �Z,��_+9�Z�g��V���4}g\5(���oP;���6I���)�zD�HYr�_��)
-�;���Q���Z63����E �ֆ�)krA��Cl���"���S"
-�l�,��fۄ2�oi5q�kUt��S�ل[2F����c��uϚ|�3�֟
-
#S7�c��HG�[����i��.��M�2���>u�8Lt��}T�cӏS�:kyh��<GB��
��"]�Sv�-�
-C��#6�c'�Sô_����\��s;�F��`vFB>�y��Q��N���a¯֒���lb�`���z�d� \���/vZ�1���C|�s�l��+�'!�u"�,���XeN�2`8�P-�Y�w�R�U/h�ᴿՂ����,��T�ڶ��Ԏ�A��>F�S�e(��x� ���E�6�os��}_!�N��@�5�F�@ї�b��w�)y'xsv��~�D�d���a�B�W�"�V-f�I�՛z�Uy����ҟerY�<��j���C��0�8;��G�Yk,1)����S��uK�T�`�S�! i�zA��W)�Y!!��ߐg�`I�&�.��lv����C
-SM�t�|,�1=��j�+��!�$����-sYH��P�)
-=��\���Yfy6}��mZU�l_�f�R�,��c\,Jp#��Y���1�˒����!�/X2;?�1��xR��P�fw]��V)�Wy3�Z.&�1�V�Tڎ�T���Ȃ�<�Bn��sY�Q�(��(��ѱs�F�d�\n&�zPg��i���I-�ʲ�S��IF|�tn>�`�L���\2�Ưs�j��l���u̢�F*�8;p��ٽ� �^.��"��('ƙ�����վ�A]Y�5�i�T` ���^
-�٤}���u��,v\bߡ㑜����r_�#
-�j�a��Y���K5y��?2_����B��L>� 0�ȝ��в2�Tڴ,���S�]*�Z������7�W�M2MJ�y9��y��.�����$�����3��Ǽ���4�A�3�2��x�Kh��x6t�3|����#�!XPq-c�<JpF��&��� ?�j�lDC�rN�I4��>�_��[
-R�)<FjSB�u�|vf{���Z�(ω���
-�]�ǟ�ʯ�Z�p[���7��շ5�?�������"0]�����r�{*�aޓ�����(]�w��g?Y�7��V��L�{&'����G���Bj;T}j�y(܆�y51��'