memLimit = readU32FromChar(&argument);
continue;
}
+ if (!strncmp(argument, "--memory=", strlen("--memory="))) {
+ argument += strlen("--memory=");
+ memLimit = readU32FromChar(&argument);
+ continue;
+ }
+ if (!strncmp(argument, "--memlimit-decompress=", strlen("--memlimit-decompress="))) {
+ argument += strlen("--memlimit-decompress=");
+ memLimit = readU32FromChar(&argument);
+ continue;
+ }
/* '-' means stdin/stdout */
if (!strcmp(argument, "-")){
$ECHO "test : impose memory limitation (must fail)"
$ZSTD -d -f tmp.zst -M2K -c > $INTOVOID && die "decompression needs more memory than allowed"
$ZSTD -d -f tmp.zst --memlimit=2K -c > $INTOVOID && die "decompression needs more memory than allowed" # long command
+$ZSTD -d -f tmp.zst --memory=2K -c > $INTOVOID && die "decompression needs more memory than allowed" # long command
+$ZSTD -d -f tmp.zst --memlimit-decompress=2K -c > $INTOVOID && die "decompression needs more memory than allowed" # long command
$ECHO "test : overwrite protection"
$ZSTD -q tmp && die "overwrite check failed!"
$ECHO "test : force overwrite"