public static string Dump(byte[] buffer) { if (buffer == null) { return(string.Empty); } MemoryStream memoryStream = new MemoryStream(buffer); string result = CpInazumaMsgPack.Dump(memoryStream); memoryStream.Close(); return(result); }
public static string Dump(string file_path) { if (!string.IsNullOrEmpty(file_path)) { if (File.Exists(file_path)) { FileStream fileStream = new FileStream(file_path, FileMode.Open); string result = CpInazumaMsgPack.Dump(fileStream); fileStream.Close(); return(result); } } return(string.Empty); }