Skip to content

Commit 0eaf0ad

Browse files
committed
Using constant.
1 parent 81b0d25 commit 0eaf0ad

File tree

1 file changed

+2
-1
lines changed
  • Provider/src/FirebirdSql.Data.FirebirdClient/Client/Managed

1 file changed

+2
-1
lines changed

Provider/src/FirebirdSql.Data.FirebirdClient/Client/Managed/XdrStream.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ internal class XdrStream : Stream
3434

3535
private const int PreferredBufferSize = 32 * 1024;
3636
private const int InvalidOperation = -1;
37+
private const int CompressionBufferSize = 1 * 1024 * 1024;
3738

3839
#endregion
3940

@@ -124,7 +125,7 @@ public XdrStream(Stream innerStream, Charset charset, bool compression, bool own
124125
{
125126
_deflate = new Ionic.Zlib.ZlibCodec(Ionic.Zlib.CompressionMode.Compress);
126127
_inflate = new Ionic.Zlib.ZlibCodec(Ionic.Zlib.CompressionMode.Decompress);
127-
_compressionBuffer = new byte[1024 * 1024];
128+
_compressionBuffer = new byte[CompressionBufferSize];
128129
}
129130

130131
_ioFailed = false;

0 commit comments

Comments
 (0)