ext: simplified code a little
ext: added flags to extract/combine
ext: endian stuff