Exemple #1
0
 /// <summary>
 /// Constructs a new instance of EncoderFactory.
 /// </summary>
 /// <param name="codeTable">The ICodeTable implementation construct the encoder with.</param>
 public EncoderFactory(ICodeTable codeTable)
 {
     this.codeTable = codeTable;
 }
 public void SetUp()
 {
     target = CreateTarget(256);
 }
 public void IsFullShouldReturnFalseWhenTableIsNotFull()
 {
     target = CreateTarget(257);
     Assert.IsFalse(target.IsFull);
 }
 public void IsFullShouldReturnTrueWhenTableIsFull()
 {
     target = CreateTarget(256);
     Assert.IsTrue(target.IsFull);
 }
Exemple #5
0
 /// <summary>
 /// Constructs a new LzwEncoder instance with the given input, output and code table.
 /// </summary>
 /// <param name="input">An IEncoderInput implementation to read characters from.</param>
 /// <param name="output">An IEncoderInput to write resulting codes to.</param>
 /// <param name="codeTable">An ICodeTable implementation to translate read sequences into codes.</param>
 public LzwEncoder(IEncoderInput input, IEncoderOutput output, ICodeTable codeTable)
 {
     this.input = input;
     this.output = output;
     this.codeTable = codeTable;
 }