The sparse support is built into Moonlight's Mod (Upcoming build: 0.42g-0.22g, ????).
CString partfull(RemoveFileExtension(m_fullname)); if (!m_hpartfile.Open(partfull,CFile::modeCreate|CFile::modeReadWrite|CFile::shareDenyWrite|CFile::osSequentialScan)){ theApp.emuledlg->AddLogLine(false,GetResString(IDS_ERR_CREATEPARTFILE)); SetStatus(PS_ERROR); } else MakeSparse(m_hpartfile, GetFileName(), false); // Moonlight: Try to make new files sparse.
// open permanent handle CString searchpath(RemoveFileExtension(m_fullname)); CFileException fexpPart; if (!m_hpartfile.Open(searchpath, CFile::modeReadWrite|CFile::shareDenyWrite|CFile::osSequentialScan, &fexpPart)){ CString strError; strError.Format(GetResString(IDS_ERR_FILEOPEN), searchpath, GetFileName()); TCHAR szError[MAX_CFEXP_ERRORMSG]; if (fexpPart.GetErrorMessage(szError, ELEMENT_COUNT(szError))){ strError += _T(" - "); strError += szError; } theApp.emuledlg->AddLogLine(false, strError); return false; } else MakeSparse(m_hpartfile, GetFileName(), false); // Moonlight: Try to make old files sparse.
1.3.6