Here is a sample method to deflate without using file I/O and using XDEV instead.

ClassMethod UnDeflate(Compressed As %String, Output UnDeflated As %String) As %Status
{
    Set sc=$$$OK
    Try {
        ; open XDEV device
        Set dev="|XDEV|"_+$JOB
        Open dev:($ZF(-6,$$$XSLTLibrary,12):/HOSTNAME="XSLT") Use dev
        ; write compressed string
        Write Compressed
        ; flush buffers
        Write *-3
        ; change device mode to deflate and rewind
        Use dev:(:/COMPRESS="DEFLATE":/POSITION=0)
        ; read uncompressed content
        Read UnDeflated
    } Catch CatchError {
        #dim CatchError as %Exception.SystemException
        Set sc=CatchError.AsStatus()
    }
    Close dev
    Quit sc
}

I really wish that InterSystems implement the various compress/deflate/gzip functionality available in device I/O as utility methods. Without silly wrappers! 😉

Another wish, please InterSystems document XDEV device I/O.

these are system classes that are part of the product that do exists in the new installed version in the %SYS namespace.

If the Studio screenshot you have posted is not from the %SYS namespace (it really does not seems so), then probably the System package is mapped to that namespace, possibly also the related globals. But...I'm guessing here from the little details and context you provide.

If %f is not working in your environment my guess is that, for some reason, the property OriginalFilename is not set in the incoming message to your EnsLib.File.PassthroughOperation Business Operation.

Where is the incoming message coming from? Why the OriginalFilename  is not set?
Can you provide some more details on your environment?