tar: store negative mtime as 0; pack very large files using base-256 encoding

function                                             old     new   delta
writeTarHeader                                       841     979    +138

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2011-05-04 21:14:12 +02:00
parent 882062915d
commit 9180c6045e
2 changed files with 33 additions and 5 deletions

View File

@ -125,7 +125,7 @@ typedef struct archive_handle_t {
#define TAR_BLOCK_SIZE 512
#define NAME_SIZE 100
#define NAME_SIZE_STR "100"
typedef struct tar_header_t { /* byte offset */
typedef struct tar_header_t { /* byte offset */
char name[NAME_SIZE]; /* 0-99 */
char mode[8]; /* 100-107 */
char uid[8]; /* 108-115 */