static function get_subpackets($input)
{
$subpackets = array();
while (($length = strlen($input)) > 0) {
$subpackets[] = self::get_subpacket($input);
if ($length == strlen($input)) {
// Parsing stuck?
break;
}
}
return $subpackets;
}