Skip to content

Commit

Permalink
upload repo
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterHUistyping committed Nov 27, 2022
0 parents commit 5131be0
Show file tree
Hide file tree
Showing 31 changed files with 4,217 additions and 0 deletions.
116 changes: 116 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

# Build and install directories
build
test

# MacOS
.DS_Store

# Files
*.json
*.log

# Symlinks to executables
encoder
decoder

# CMake junk
CMakeCache.txt
/CMakeFiles/
cmake_install.cmake
Makefile

# Editor Junk
/.vscode/
/local_backup/
.idea/.gitignore
.idea/.name
.idea/dev-huffman.iml
.idea/misc.xml
.idea/modules.xml
.idea/vcs.xml
cmake-build-debug/build.ninja
cmake-build-debug/.cmake/api/v1/query/cache-v2
cmake-build-debug/.cmake/api/v1/query/cmakeFiles-v1
cmake-build-debug/.cmake/api/v1/query/codemodel-v2
cmake-build-debug/.cmake/api/v1/query/toolchains-v1
cmake-build-debug/CMakeFiles/clion-environment.txt
cmake-build-debug/CMakeFiles/clion-log.txt
cmake-build-debug/CMakeFiles/cmake.check_cache
cmake-build-debug/CMakeFiles/rules.ninja
cmake-build-debug/CMakeFiles/TargetDirectories.txt
cmake-build-debug/CMakeFiles/3.24.3/CMakeCCompiler.cmake
cmake-build-debug/CMakeFiles/3.24.3/CMakeCXXCompiler.cmake
cmake-build-debug/CMakeFiles/3.24.3/CMakeDetermineCompilerABI_C.bin
cmake-build-debug/CMakeFiles/3.24.3/CMakeDetermineCompilerABI_CXX.bin
cmake-build-debug/CMakeFiles/3.24.3/CMakeSystem.cmake
cmake-build-debug/CMakeFiles/3.24.3/CompilerIdC/CMakeCCompilerId.c
cmake-build-debug/CMakeFiles/3.24.3/CompilerIdCXX/CMakeCXXCompilerId.cpp
cmake-build-release/.ninja_deps
cmake-build-release/.ninja_log
cmake-build-release/build.ninja
cmake-build-release/dbgPrettyPrint.diag
cmake-build-release/decomp
cmake-build-release/huffman
cmake-build-release/.cmake/api/v1/query/cache-v2
cmake-build-release/.cmake/api/v1/query/cmakeFiles-v1
cmake-build-release/.cmake/api/v1/query/codemodel-v2
cmake-build-release/.cmake/api/v1/query/toolchains-v1
cmake-build-release/CMakeFiles/clion-environment.txt
cmake-build-release/CMakeFiles/clion-log.txt
cmake-build-release/CMakeFiles/cmake.check_cache
cmake-build-release/CMakeFiles/rules.ninja
cmake-build-release/CMakeFiles/TargetDirectories.txt
cmake-build-release/CMakeFiles/3.24.3/CMakeCCompiler.cmake
cmake-build-release/CMakeFiles/3.24.3/CMakeCXXCompiler.cmake
cmake-build-release/CMakeFiles/3.24.3/CMakeDetermineCompilerABI_C.bin
cmake-build-release/CMakeFiles/3.24.3/CMakeDetermineCompilerABI_CXX.bin
cmake-build-release/CMakeFiles/3.24.3/CMakeSystem.cmake
cmake-build-release/CMakeFiles/3.24.3/CompilerIdC/CMakeCCompilerId.c
cmake-build-release/CMakeFiles/3.24.3/CompilerIdCXX/CMakeCXXCompilerId.cpp
src/dbgPrettyPrint.diag
src/decoder_main
src/encodeMapResultOutput.bin
src/HuffmanD
src/dbgPrettyPrint.diag
src/decoder_main
src/encodeMapResultOutput.bin
src/HuffmanD
dbgPrettyPrint.diag
decompress
de
encodeMapResultOutput.bin
main
outputFull.bin
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "sample-models"]
path = sample-models
url = git@github.com:UKTechArena/sample-models.git
29 changes: 29 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# $COPYRIGHT

cmake_minimum_required(VERSION 3.0.0)
project(example-template VERSION 0.1.0)

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

include_directories(
"${PROJECT_SOURCE_DIR}/include"
)

list(APPEND samples encoder)
list(APPEND samples decoder)
# list(APPEND samples serialize)


file(GLOB_RECURSE core_sources ${PROJECT_SOURCE_DIR}/src/core/*.cpp)
foreach(sample ${samples})
set(exec ${sample})
file(GLOB_RECURSE ${sample}_sources ${PROJECT_SOURCE_DIR}/src/${sample}/*.cpp)
add_executable(${exec}
${PROJECT_SOURCE_DIR}/src/${sample}_main.cpp
${core_sources}
${${sample}_sources})
target_compile_options(${exec} PUBLIC -std=gnu++17 -Wall -O3)
install(TARGETS ${exec} DESTINATION bin)
endforeach(sample)
34 changes: 34 additions & 0 deletions NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
It seems that the whole system is tested using syslink `./decoder` and `./encoder`. So it's cool to use python, just don't forget to add shebang and give it `x` permission.

Command to run the test in `scripts/test_non_ai.sh`
```bash
./encoder -i $input_file_path -o $encoded_file_path > /dev/null 2>&1
```

Build_non_ai is modified to make it work with python. Check the content of it and it's easy to understand.

## Performance of GZIP (Baseline)
```
Average compression ratio: 0.585738 percent
Average decompression time: 27.1818 milliseconds
Average image quality metric 0 decibels
Weighted compression score (35%): 20.5008
Weighted time score (25%): 24.3205
Weighted quality score (20%): 0
Total score (80%): 44.8213
```

## Performance of the command of `cp`
```
Average compression ratio: 0 percent
Average decompression time: 1.18182 milliseconds
Average image quality metric 0 decibels
Weighted compression score (35%): 0
Weighted time score (25%): 24.9705
Weighted quality score (20%): 0
Total score (80%): 24.9705
```
Loading

0 comments on commit 5131be0

Please sign in to comment.