Generalize FromStream type signature