open compressed expects string paths. This function would be more useful if it accepted both path objects and strings representing paths.