public void Expand() { int N = input.ReadInt(); // Read two bits; write char. for (int i = 0; i < N; i++) { char c = input.ReadChar(2); output.Write(Alphabet.Dna.ToChar(c), 8); } output.Close(); input.Close(); }
public void Expand() { bool b = false; while (!input.IsEmpty) { int run = input.ReadInt(LG_R); for (int i = 0; i < run; i++) { output.Write(b); } b = !b; } output.Close(); }