Browse Source

Move public method above privates in Vp8LBitWriter

pull/1552/head
Steve Temple 6 years ago
parent
commit
231f19b13d
  1. 14
      src/ImageSharp/Formats/WebP/BitWriter/Vp8LBitWriter.cs

14
src/ImageSharp/Formats/WebP/BitWriter/Vp8LBitWriter.cs

@ -100,6 +100,13 @@ namespace SixLabors.ImageSharp.Formats.WebP.BitWriter
return this.cur + ((this.used + 7) >> 3);
}
public Vp8LBitWriter Clone()
{
byte[] clonedBuffer = new byte[this.buffer.Length];
Buffer.BlockCopy(this.buffer, 0, clonedBuffer, 0, this.cur);
return new Vp8LBitWriter(clonedBuffer, this.bits, this.used, this.cur);
}
/// <summary>
/// Internal function for PutBits flushing 32 bits from the written state.
/// </summary>
@ -143,12 +150,5 @@ namespace SixLabors.ImageSharp.Formats.WebP.BitWriter
this.end = this.buffer.Length;
}
public Vp8LBitWriter Clone()
{
byte[] clonedBuffer = new byte[this.buffer.Length];
Buffer.BlockCopy(this.buffer, 0, clonedBuffer, 0, this.cur);
return new Vp8LBitWriter(clonedBuffer, this.bits, this.used, this.cur);
}
}
}

Loading…
Cancel
Save