loc = ctx.getHeap().resolveSourceLocation(loc);
OutputStream out = null;
try{
out = ctx.getResolverRegistry().getOutputStream(loc.getURI(), false);
new BinaryValueWriter().write(value, out, compression.getValue());
}catch (IOException ioex){
throw RuntimeExceptionFactory.io(values.string(ioex.getMessage()), null, null);
}finally{
if(out != null){
try{