Exemplo n.º 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;
 }
Exemplo n.º 2
0
 public void SetUp()
 {
     target = CreateTarget(256);
 }
Exemplo n.º 3
0
 public void IsFullShouldReturnFalseWhenTableIsNotFull()
 {
     target = CreateTarget(257);
     Assert.IsFalse(target.IsFull);
 }
Exemplo n.º 4
0
 public void IsFullShouldReturnTrueWhenTableIsFull()
 {
     target = CreateTarget(256);
     Assert.IsTrue(target.IsFull);
 }
Exemplo n.º 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;
 }