Deleted Added
full compact
compress.c (78556) compress.c (90067)
1
2/*-------------------------------------------------------------*/
3/*--- Compression machinery (not incl block sorting) ---*/
4/*--- compress.c ---*/
5/*-------------------------------------------------------------*/
6
7/*--
8 This file is a part of bzip2 and/or libbzip2, a program and
9 library for lossless, block-sorting data compression.
10
1
2/*-------------------------------------------------------------*/
3/*--- Compression machinery (not incl block sorting) ---*/
4/*--- compress.c ---*/
5/*-------------------------------------------------------------*/
6
7/*--
8 This file is a part of bzip2 and/or libbzip2, a program and
9 library for lossless, block-sorting data compression.
10
11 Copyright (C) 1996-2000 Julian R Seward. All rights reserved.
11 Copyright (C) 1996-2002 Julian R Seward. All rights reserved.
12
13 Redistribution and use in source and binary forms, with or without
14 modification, are permitted provided that the following conditions
15 are met:
16
17 1. Redistributions of source code must retain the above copyright
18 notice, this list of conditions and the following disclaimer.
19

--- 638 unchanged lines hidden (view full) ---

658 BZ2_blockSort ( s );
659 }
660
661 s->zbits = (UChar*) (&((UChar*)s->arr2)[s->nblock]);
662
663 /*-- If this is the first block, create the stream header. --*/
664 if (s->blockNo == 1) {
665 BZ2_bsInitWrite ( s );
12
13 Redistribution and use in source and binary forms, with or without
14 modification, are permitted provided that the following conditions
15 are met:
16
17 1. Redistributions of source code must retain the above copyright
18 notice, this list of conditions and the following disclaimer.
19

--- 638 unchanged lines hidden (view full) ---

658 BZ2_blockSort ( s );
659 }
660
661 s->zbits = (UChar*) (&((UChar*)s->arr2)[s->nblock]);
662
663 /*-- If this is the first block, create the stream header. --*/
664 if (s->blockNo == 1) {
665 BZ2_bsInitWrite ( s );
666 bsPutUChar ( s, 'B' );
667 bsPutUChar ( s, 'Z' );
668 bsPutUChar ( s, 'h' );
669 bsPutUChar ( s, (UChar)('0' + s->blockSize100k) );
666 bsPutUChar ( s, BZ_HDR_B );
667 bsPutUChar ( s, BZ_HDR_Z );
668 bsPutUChar ( s, BZ_HDR_h );
669 bsPutUChar ( s, (UChar)(BZ_HDR_0 + s->blockSize100k) );
670 }
671
672 if (s->nblock > 0) {
673
674 bsPutUChar ( s, 0x31 ); bsPutUChar ( s, 0x41 );
675 bsPutUChar ( s, 0x59 ); bsPutUChar ( s, 0x26 );
676 bsPutUChar ( s, 0x53 ); bsPutUChar ( s, 0x59 );
677

--- 37 unchanged lines hidden ---
670 }
671
672 if (s->nblock > 0) {
673
674 bsPutUChar ( s, 0x31 ); bsPutUChar ( s, 0x41 );
675 bsPutUChar ( s, 0x59 ); bsPutUChar ( s, 0x26 );
676 bsPutUChar ( s, 0x53 ); bsPutUChar ( s, 0x59 );
677

--- 37 unchanged lines hidden ---