fn create_zip_archive<T: Seek + Write>(buf: &mut T, song_json: String) -> ZipResult<()> {
	let mut writer = ZipWriter::new(buf);
	println!("Adding ExpertPlus");

	writer.start_file("ExpertPlus.dat", FileOptions::default())?;
	writer.write_all(song_json.as_bytes())?;

	println!("Adding cover");
	let cover = include_bytes!("./song/cover.jpg");
	writer.start_file("cover.jpg", FileOptions::default())?;
	writer.write_all(cover)?;
	println!("Adding info");
	let info = include_bytes!("./song/info.dat");
	writer.start_file("info.dat", FileOptions::default())?;
	writer.write_all(info)?;
	println!("Adding song");
	let song = include_bytes!("./song/song.ogg");
	writer.start_file("song.ogg", FileOptions::default())?;
	writer.write_all(song)?;
	let song_egg = include_bytes!("./song/song.egg");
	writer.start_file("song.egg", FileOptions::default())?;
	writer.write_all(song_egg)?;
	println!("Adding done");
	writer.finish()?;
	Ok(())
}
/*
	* Zip up the important files from /src/song
	* This is the zip beat saber, bsaber, or the map previewer can use
 */
Zip up the important files from /src/song
This is the zip beat saber, bsaber, or the map previewer can use
Zip up the important files from / src / song This is the zip beat saber bsaber or the map previewer can use
fn create_zip_archive<T: Seek + Write>(buf: &mut T, song_json: String) -> ZipResult<()> {
	let mut writer = ZipWriter::new(buf);
	println!("Adding ExpertPlus");
	writer.start_file("ExpertPlus.dat", FileOptions::default())?;
	writer.write_all(song_json.as_bytes())?;
	println!("Adding cover");
	let cover = include_bytes!("./song/cover.jpg");
	writer.start_file("cover.jpg", FileOptions::default())?;
	writer.write_all(cover)?;
	println!("Adding info");
	let info = include_bytes!("./song/info.dat");
	writer.start_file("info.dat", FileOptions::default())?;
	writer.write_all(info)?;
	println!("Adding song");
	let song = include_bytes!("./song/song.ogg");
	writer.start_file("song.ogg", FileOptions::default())?;
	writer.write_all(song)?;
	let song_egg = include_bytes!("./song/song.egg");
	writer.start_file("song.egg", FileOptions::default())?;
	writer.write_all(song_egg)?;
	println!("Adding done");
	writer.finish()?;
	Ok(())
}
fn create_zip_archive < T : Seek + Write > ( buf : & mut T , song_json : String ) -> ZipResult < ( ) > { let mut writer = ZipWriter :: new ( buf ) ; println ! ( " " ) ; writer . start_file ( " " , FileOptions :: default ( ) ) ? ; writer . write_all ( song_json . as_bytes ( ) ) ? ; println ! ( " " ) ; let cover = include_bytes ! ( " " ) ; writer . start_file ( " " , FileOptions :: default ( ) ) ? ; writer . write_all ( cover ) ? ; println ! ( " " ) ; let info = include_bytes ! ( " " ) ; writer . start_file ( " " , FileOptions :: default ( ) ) ? ; writer . write_all ( info ) ? ; println ! ( " " ) ; let song = include_bytes ! ( " " ) ; writer . start_file ( " " , FileOptions :: default ( ) ) ? ; writer . write_all ( song ) ? ; let song_egg = include_bytes ! ( " " ) ; writer . start_file ( " " , FileOptions :: default ( ) ) ? ; writer . write_all ( song_egg ) ? ; println ! ( " " ) ; writer . finish ( ) ? ; Ok ( ( ) ) }
Zip up the important files from /src/song
 This is the zip beat saber, bsaber, or the map previewer can use
Zip up the important files from / src / song This is the zip beat saber bsaber or the map previewer can use
buf
&mut T
song_json
String
buf
&mut T
song_json
String