public void convert(string name, ParameterParser args, Stream from, Stream to) { var obj = new zzio.db.Table(); obj.Read(from); byte[] buffer = Encoding.Default.GetBytes(Utils.convertToJSON(obj)); to.Write(buffer, 0, buffer.Length); }
private zzio.db.MappedDB LoadDatabase() { var mappedDb = new zzio.db.MappedDB(); var resourcePool = GetTag <IResourcePool>(); for (int i = 1; i <= MaxDatabaseModule; i++) { using var tableStream = resourcePool.FindAndOpen($"Data/_fb0x0{i}.fbs"); if (tableStream == null) { continue; } var table = new zzio.db.Table(); table.Read(tableStream); mappedDb.AddTable(table); } return(mappedDb); }