This will allow using this function for encoding as well, where the input format is already the semi-packed version.