エンコードの進行状況を表示する
| 1472 | |
| 1473 | // エンコードの進行状況を表示する |
| 1474 | void DXArchive::EncodeStatusOutput(DARC_ENCODEINFO *EncodeInfo, bool Always) |
| 1475 | { |
| 1476 | static TCHAR StringBuffer[8192]; |
| 1477 | static TCHAR FileNameBuffer[2048]; |
| 1478 | size_t FileNameLength; |
| 1479 | unsigned int NowTime = GetTickCount(); |
| 1480 | |
| 1481 | // 前回から16ms以上時間が経過していたら表示する |
| 1482 | if (Always == false && NowTime - EncodeInfo->PrevDispTime < 16) |
| 1483 | { |
| 1484 | return; |
| 1485 | } |
| 1486 | |
| 1487 | // 前回の表示内容を消去 |
| 1488 | EncodeStatusErase(); |
| 1489 | |
| 1490 | EncodeInfo->PrevDispTime = NowTime; |
| 1491 | wcscpy(FileNameBuffer, EncodeInfo->ProcessFileName); |
| 1492 | FileNameLength = _tcslen(EncodeInfo->ProcessFileName); |
| 1493 | if (FileNameLength > 50) |
| 1494 | { |
| 1495 | wcsncpy(FileNameBuffer, EncodeInfo->ProcessFileName, 50); |
| 1496 | wcscpy(&FileNameBuffer[50], TEXT("...")); |
| 1497 | } |
| 1498 | wsprintf(StringBuffer, TEXT(" [%d/%d] %d%%%% %s"), EncodeInfo->CompFileNum, EncodeInfo->TotalFileNum, EncodeInfo->CompFileNum * 100 / EncodeInfo->TotalFileNum, FileNameBuffer); |
| 1499 | LogStringLength = _tcslen(StringBuffer); |
| 1500 | wprintf(StringBuffer); |
| 1501 | } |
| 1502 | |
| 1503 | // ハフマン圧縮をする前後のサイズを取得する |
| 1504 | void DXArchive::AnalyseHuffmanEncode(u64 DataSize, u8 HuffmanEncodeKB, u64 *HeadDataSize, u64 *FootDataSize) |
nothing calls this directly
no outgoing calls
no test coverage detected