Ported to .NET K-S-V AdobeHDS.php