formatBytes() — mcp Function Reference
Architecture documentation for the formatBytes() function in zip-repository.ts from the mcp codebase.
Entity Profile
Dependency Diagram
graph TD acd13495_08c9_df51_1b17_173570f3e5ea["formatBytes()"] 1fd46af5_c3e2_8998_1eb2_098430ff3629["zipRepository()"] 1fd46af5_c3e2_8998_1eb2_098430ff3629 -->|calls| acd13495_08c9_df51_1b17_173570f3e5ea 5c9096db_a74b_41f3_ba88_9738d6d799b5["addFilesRecursively()"] 5c9096db_a74b_41f3_ba88_9738d6d799b5 -->|calls| acd13495_08c9_df51_1b17_173570f3e5ea style acd13495_08c9_df51_1b17_173570f3e5ea fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/utils/zip-repository.ts lines 707–712
function formatBytes(bytes: number): string {
if (bytes < 1024) return `${bytes} B`;
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(2)} KB`;
if (bytes < 1024 * 1024 * 1024) return `${(bytes / (1024 * 1024)).toFixed(2)} MB`;
return `${(bytes / (1024 * 1024 * 1024)).toFixed(2)} GB`;
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does formatBytes() do?
formatBytes() is a function in the mcp codebase.
What calls formatBytes()?
formatBytes() is called by 2 function(s): addFilesRecursively, zipRepository.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free