Project Maintenance

This commit is contained in:
Gustave Monce
2021-08-09 20:21:09 +02:00
parent 9865ef7f79
commit 847ce0506d
411 changed files with 5922 additions and 54941 deletions
+10 -5
View File
@@ -4,11 +4,11 @@ namespace SevenZip.Buffer
{
public class OutBuffer
{
byte[] m_Buffer;
uint m_Pos;
uint m_BufferSize;
System.IO.Stream m_Stream;
ulong m_ProcessedSize;
private readonly byte[] m_Buffer;
private uint m_Pos;
private readonly uint m_BufferSize;
private System.IO.Stream m_Stream;
private ulong m_ProcessedSize;
public OutBuffer(uint bufferSize)
{
@@ -31,13 +31,18 @@ namespace SevenZip.Buffer
{
m_Buffer[m_Pos++] = b;
if (m_Pos >= m_BufferSize)
{
FlushData();
}
}
public void FlushData()
{
if (m_Pos == 0)
{
return;
}
m_Stream.Write(m_Buffer, 0, (int)m_Pos);
m_Pos = 0;
}