mirror of
https://github.com/ReneLergner/WPinternals.git
synced 2026-06-21 14:41:03 +10:00
Project Maintenance
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user