public Biff8DecryptingStream(Stream in1, int InitialOffSet, Biff8EncryptionKey key) { _rc4 = new Biff8RC4(InitialOffSet, key); if (in1 is ILittleEndianInput) { // accessing directly is an optimisation _le = (ILittleEndianInput)in1; } else { // less optimal, but should work OK just the same. Often occurs in junit tests. _le = new LittleEndianInputStream(in1); } }