add istream for serialised CompactArray class