diff --git a/source/par2j/Command_par2j.txt b/source/par2j/Command_par2j.txt index 32993dd..304d2cf 100644 --- a/source/par2j/Command_par2j.txt +++ b/source/par2j/Command_par2j.txt @@ -1,4 +1,4 @@ -[ par2j.exe - version 1.3.3.4 or later ] +[ par2j.exe - version 1.3.3.5 or later ] Type "par2j.exe" to see version, test integrity, and show usage below. @@ -312,7 +312,7 @@ Because it may be difficult to predict recovery file size, use trial command to see how is the size. When it's "/lr" or "/lr0", block count of the largest input file is used. (If the max file is 1000 KB and block size is 10 KB, /lr is same as /lr100.) -When split size "/ls" is set with "/lr0", +When both "/lr0" and "/ls(split size)" are set, block count of the splited file size is used instead of the largest input file. for example, /lr , /lr10 , /lr2000 @@ -364,6 +364,13 @@ This is possible, only when there is one input file of .ZIP or .7z format. When recovery files are created in a different directory, the protected archive file is made in the directory. + /ls2 has a special feature to set limit size of recovery files directly. +When both "/ls2" and "/lr(limit size)" are set, +setting number of /lr is recognizned as file size instead of number of blocks. +In this usage, setting limit size must be less than 2 GB. +If you want max 100 MB each file size, set like these; /ls2 /lr102400000 +Because the calculation ignores packets, you may set a bit smaller size. + for example, /ls10000 , /ls1048576, /ls1 /lc : diff --git a/source/par2j/par2_cmd.c b/source/par2j/par2_cmd.c index 94384a8..d0e4819 100644 --- a/source/par2j/par2_cmd.c +++ b/source/par2j/par2_cmd.c @@ -1,5 +1,5 @@ // par2_cmd.c -// Copyright : 2024-11-30 Yutaka Sawada +// Copyright : 2025-03-12 Yutaka Sawada // License : GPL #ifndef _UNICODE @@ -1448,14 +1448,12 @@ ri= switch_set & 0x00040000 } else if (wcsncmp(tmp_p, L"lr", 2) == 0){ recovery_limit = 0; j = 2; - while ((j < 2 + 6) && (tmp_p[j] >= '0') && (tmp_p[j] <= '9')){ + while ((j < 2 + 10) && (tmp_p[j] >= '0') && (tmp_p[j] <= '9')){ recovery_limit = (recovery_limit * 10) + (tmp_p[j] - '0'); j++; } if (recovery_limit <= 0) // -lr0 ならソース・ファイルの最大ブロック数と同じにする recovery_limit = -1; - if (recovery_limit > MAX_PARITY_NUM) - recovery_limit = MAX_PARITY_NUM; } else if (wcsncmp(tmp_p, L"ls", 2) == 0){ __int64 num8 = 0; j = 2; @@ -1977,6 +1975,14 @@ fclose(fp); if (recovery_limit > j) recovery_limit = j; } + } else { + if (split_size == 2){ // 制限をブロック数ではなく、サイズとして認識する + recovery_limit /= block_size; + if (recovery_limit < 1) + recovery_limit = 1; + } + if (recovery_limit > MAX_PARITY_NUM) // パリティ・ブロック数の最大値を超えない + recovery_limit = MAX_PARITY_NUM; } // パリティ・ブロックをリカバリ・ファイルに分配する方法 i = (switch_set & 0x30000) >> 16; diff --git a/source/par2j/res_par2j.rc b/source/par2j/res_par2j.rc index b4490f5..174d348 100644 --- a/source/par2j/res_par2j.rc +++ b/source/par2j/res_par2j.rc @@ -1,7 +1,7 @@ 1 RT_STRING ".\\source.cl" 1 VERSIONINFO -FILEVERSION 1,3,3,4 +FILEVERSION 1,3,3,5 PRODUCTVERSION 1,3,3,0 FILEOS 0x40004 FILETYPE 0x1 @@ -11,9 +11,9 @@ BLOCK "StringFileInfo" BLOCK "040904B0" { VALUE "FileDescription", "PAR2 client" - VALUE "LegalCopyright", "Copyright (C) 2024 Yutaka Sawada" + VALUE "LegalCopyright", "Copyright (C) 2025 Yutaka Sawada" VALUE "ProductName", "par2j" - VALUE "FileVersion", "1.3.3.4" + VALUE "FileVersion", "1.3.3.5" VALUE "ProductVersion", "1.3.3.0" } } diff --git a/source/par2j/version.h b/source/par2j/version.h index 7219f2d..7ebb4da 100644 --- a/source/par2j/version.h +++ b/source/par2j/version.h @@ -1,2 +1,2 @@ -#define FILE_VERSION "1.3.3.4" // ファイルのバージョン番号 +#define FILE_VERSION "1.3.3.5" // ファイルのバージョン番号 #define PRODUCT_VERSION "1.3.3" // 製品のバージョン番号