ccc f
This commit is contained in:
5
test.py
5
test.py
@@ -8,7 +8,7 @@ def get_source_files(root_dir):
|
||||
total_size = 0
|
||||
for root, _, files in os.walk(root_dir):
|
||||
for file in files:
|
||||
if file.endswith(('.c', '.h')) and len(source_files)<20000:
|
||||
if file.endswith(('.c', '.h')) and len(source_files)<30000:
|
||||
path = os.path.join(root, file)
|
||||
source_files.append(path)
|
||||
total_size += os.path.getsize(path)
|
||||
@@ -34,6 +34,7 @@ def main():
|
||||
process_tar.communicate(input="\n".join(files).encode())
|
||||
end_tar = time.time()
|
||||
|
||||
|
||||
# 2. Compression avec CCC
|
||||
print("\n--- Lancement de CCC (Output temps réel) ---")
|
||||
print("-" * 40)
|
||||
@@ -54,7 +55,7 @@ def main():
|
||||
print(f" RÉSULTATS (Source: {raw_mo:.2f} Mo)")
|
||||
print("="*40)
|
||||
|
||||
for name, filename in [("TAR.XZ", "linux_sources.tar.xz"), ("CCC", "test.ccc")]:
|
||||
for name, filename in [("TAR.XZ", "linux_sources.tar.xz"), ("CCC", "test.ccc"), ("TAR.ZXC", "linux_sources.tar.zxc")]:
|
||||
if os.path.exists(filename):
|
||||
size_mo = os.path.getsize(filename) / (1024 * 1024)
|
||||
ratio = (size_mo / raw_mo) * 100
|
||||
|
||||
Reference in New Issue
Block a user