import from array or readable object stream