mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-09-22 15:04:43 +00:00
fix: increase RewindableBufferSize to 160KB to cover ZStandard worst-case first block
Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
This commit is contained in:
@@ -22,7 +22,9 @@ public static class Constants
|
||||
/// by rewinding and re-reading the same data.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <b>Default:</b> 81920 bytes (81KB) - sufficient for typical format detection.
|
||||
/// <b>Default:</b> 163840 bytes (160KB) - sized to cover ZStandard's worst-case
|
||||
/// first block on a tar archive (~131KB including frame header overhead).
|
||||
/// ZStandard blocks can be up to 128KB, exceeding the previous 81KB default.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <b>Typical usage:</b> 500-1000 bytes for most archives
|
||||
@@ -39,7 +41,7 @@ public static class Constants
|
||||
/// </list>
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public static int RewindableBufferSize { get; set; } = 81920;
|
||||
public static int RewindableBufferSize { get; set; } = 163840;
|
||||
|
||||
public static CultureInfo DefaultCultureInfo { get; set; } = CultureInfo.InvariantCulture;
|
||||
}
|
||||
|
||||
@@ -76,7 +76,8 @@ public sealed record ReaderOptions : IReaderOptions
|
||||
/// by rewinding and re-reading the same data.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <b>Default:</b> Constants.RewindableBufferSize (81920 bytes / 81KB)
|
||||
/// <b>Default:</b> Constants.RewindableBufferSize (163840 bytes / 160KB) - sized to cover
|
||||
/// ZStandard's worst-case first block on a tar archive (~131KB including header overhead).
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <b>Typical usage:</b> 500-1000 bytes for most archives
|
||||
|
||||
Reference in New Issue
Block a user