Bump version to 0.541.

Limit LZMA window to 300MB on 32 bit as per reports of failure when larger.
Minor documentation and display clean ups.
This commit is contained in:
Con Kolivas 2010-11-18 23:33:43 +11:00
parent 81ac86856b
commit 591d791791
7 changed files with 42 additions and 49 deletions

View file

@ -649,9 +649,9 @@ static pthread_t *threads;
compression level and algorithm */
void *open_stream_out(int f, int n, i64 limit)
{
unsigned cwindow = control.window;
struct stream_info *sinfo;
uchar *testmalloc;
unsigned cwindow;
int i;
sinfo = malloc(sizeof(*sinfo));
@ -690,11 +690,14 @@ void *open_stream_out(int f, int n, i64 limit)
sinfo->fd = f;
if (BITS32) {
/* Largest window supported on 32bit is 600MB */
if (!cwindow || cwindow > 6)
cwindow = 6;
control.window = cwindow;
/* Largest window we can safely support on 32bit is 2GB */
if (!control.window || control.window > 20)
control.window = 20;
/* Largest window supported by lzma is 300MB */
if (LZMA_COMPRESS && control.window > 3)
control.window = 3;
}
cwindow = control.window;
/* No point making the stream larger than the amount of data */
if (cwindow)