blob: 5b749c11d5c8e4ab8e1cb5f3f7091b0cf6b74ae9 [file] [log] [blame]
// Copyright 2012 Google Inc. All Rights Reserved.
package com.google.typography.font.compression;
/**
* @author raph@google.com (Raph Levien)
*/
public class CompressLzma {
// This is currently implemented by shelling out to a command line helper,
// which is fine for research purposes, but obviously problematic for
// production.
public static byte[] compress(byte[] input) {
try {
String[] args = {"/usr/bin/lzma"};
CommandResult result = new Command(args).execute(input);
return result.getStdout();
} catch (CommandException e) {
throw new RuntimeException(e);
}
}
}