We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ceb7bf4 commit 37e2bcbCopy full SHA for 37e2bcb
src/KurrentDB.Common/Compression/Rfc1952GzipCompressionProvider.cs
@@ -92,14 +92,20 @@ async ValueTask WriteEmptyGZipPayloadAsync(CancellationToken cancellationToken =
92
93
// See RFC 1952 (https://datatracker.ietf.org/doc/html/rfc1952)
94
static ReadOnlyMemory<byte> EmptyGzip => new byte[] {
95
+ // GZIP Header (RFC 1952)
96
0x1f, 0x8b, // Magic number
97
0x08, // Compression method: deflate
98
0x00, // Flags: none
99
0x00, 0x00, 0x00, 0x00, // Modification time: 0 (unknown)
100
0x00, // Extra flags: none
101
0xff, // Operating system: unknown (255)
- 0x03, 0x00, // Block header: no compression, 0 bytes
102
- 0x00, 0x00, // LEN = 0, NLEN = 0 (complement)
+
103
+ // DEFLATE Block (RFC 1951)
104
+ 0x01, // BFINAL=1, BTYPE=00 (stored/no compression)
105
+ 0x00, 0x00, // LEN = 0
106
+ 0xff, 0xff, // NLEN = 0xFFFF (one's complement of 0)
107
108
+ // GZIP Footer (RFC 1952)
109
0x00, 0x00, 0x00, 0x00, // CRC-32 for empty data
110
0x00, 0x00, 0x00, 0x00 // Size: 0 bytes
111
};
0 commit comments