D Paste by the_darkside_986
Description: Writer using a BzipOutput
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | // .... FilePath fp; FileConduit datFile; BzipOutput bzOut; try { fp = new FilePath("data/maps/" ~ filename ~ ".dat"); datFile = new FileConduit(fp, FileConduit.WriteCreate); bzOut = new BzipOutput(datFile.output); Writer write = new Writer(bzOut); write.put(sig)(m_name)(m_tileTableID) (m_leftMap)(m_topMap)(m_rightMap)(m_bottomMap) (m_width)(m_height)(cast(ushort[])m_tiles)(); bzOut.close(); // .... |