Skip to content

Commit 8d7cdf9

Browse files
authored
Update README.md
1 parent 6f0de72 commit 8d7cdf9

File tree

1 file changed

+49
-46
lines changed

1 file changed

+49
-46
lines changed

README.md

Lines changed: 49 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,99 @@
1+
# `BitArray`
12

2-
# BitArray
3+
> *Read this in other languages: [English](README.md), :kr: [Korean](README.ko.md)
34
4-
`BitArray`**비트 단위 데이터 조작 및 관리**를 위한 경량 유틸리티입니다.
5-
**C++****Python** 두 언어로 구현되어 있으며, 네트워크, 데이터 압축, 바이너리 분석 등의 분야에서 활용 가능합니다.
5+
<br />
6+
7+
`BitArray` is a lightweight class for **bit-level data manipulation and management**.
8+
It is implemented in both **C++** and **Python**, and can be used in areas such as networking, data compression, and binary analysis.
69

7-
## 📁 프로젝트 구조
10+
## 📁 Project Structure
811

912
```
1013
BitArray-main/
11-
├── cpp/ # C++ 구현
14+
├── cpp/ # C++ implementation
1215
│ ├── main.cpp
1316
│ └── README.md
14-
├── python/ # Python 구현
17+
├── python/ # Python implementation
1518
│ ├── BitArray.py
1619
│ └── README.md
17-
├── README.md # 프로젝트 소개 문서
20+
├── README.md # Project introduction
1821
├── LICENSE
1922
└── .gitignore
2023
```
2124

2225
---
2326

24-
## 💡 기능 요약
27+
## 💡 Feature Summary
2528

26-
| 기능 | 설명 |
27-
|---------------|----------------------------------------------------------------------|
28-
| 비트 초기화 | 바이트 배열 또는 비트 크기를 기반으로 비트 배열 생성 |
29-
| 비트 추출 | 특정 오프셋과 길이에 따라 부분 비트 배열 추출 |
30-
| 비트 병합 | 다른 비트 배열을 지정 위치에 병합 가능 |
31-
| 비트 연산 | `+`, `<<`, `>>` 연산자 지원 |
32-
| 비트 반전 | 비트 순서를 역으로 뒤집는 `reverser()` 지원 |
33-
| 시각화 | 사람이 읽기 쉬운 형식으로 비트 출력 (`print`, `dump`) |
34-
| 유닛 테스트 | 다양한 연산에 대한 테스트 코드 포함 |
29+
| Feature | Description |
30+
|----------------|--------------------------------------------------------------------------|
31+
| Bit Initialization | Create bit arrays from byte arrays or specified bit sizes |
32+
| Bit Extraction | Extract sub-bit arrays based on offset and length |
33+
| Bit Merging | Merge another bit array at a specified position |
34+
| Bit Operations | Supports operators like `+`, `<<`, `>>` |
35+
| Bit Reversal | Supports `reverser()` to reverse bit order |
36+
| Visualization | Print bits in human-readable format using `print`, `dump` |
37+
| Unit Testing | Includes test code for various operations |
3538

3639
---
3740

38-
## 🧠 언어별 구현
41+
## 🧠 Language Implementations
3942

4043
### ✅ C++
4144

42-
- 구현 파일: `cpp/`
43-
- 주요 클래스: `BitArray`
44-
- STL 기반 고성능 구현
45-
- 단위 테스트 포함 (main.cpp)
46-
- 주요 특징:
47-
- `std::vector<uint8_t>` 기반 저장
48-
- `get`, `merge`, `toArray`, `dump` 등 다양한 비트 처리 메서드 제공
45+
- Source files: `cpp/`
46+
- Main class: `BitArray`
47+
- High-performance implementation based on STL
48+
- Includes unit test (`main.cpp`)
49+
- Highlights:
50+
- Uses `std::vector<uint8_t>` for storage
51+
- Offers various bit manipulation methods like `get`, `merge`, `toArray`, `dump`
4952

50-
📄 자세한 내용: [`cpp/README.md`](cpp/README.md)
53+
📄 More details: [`cpp/README.md`](cpp/README.md)
5154

5255
---
5356

5457
### ✅ Python
5558

56-
- 구현 파일: `python/`
57-
- 주요 클래스: `BitArray`
58-
- 파이썬 리스트와 비트 조작을 통한 구현
59-
- 주요 특징:
60-
- 비트 배열 병합 및 추출
61-
- `to_array`, `to_int_array`, `reverser`, `__add__`, `__rshift__`, `__lshift__` 지원
62-
- 단위 테스트 함수 포함
59+
- Source files: `python/`
60+
- Main class: `BitArray`
61+
- Implemented using Python lists and bit manipulation
62+
- Highlights:
63+
- Supports merging and extracting bit arrays
64+
- Provides `to_array`, `to_int_array`, `reverser`, `__add__`, `__rshift__`, `__lshift__`
65+
- Includes unit test function
6366

64-
📄 자세한 내용: [`python/README.md`](python/README.md)
67+
📄 More details: [`python/README.md`](python/README.md)
6568

6669
---
6770

68-
## 🔬 사용 예시
71+
## 🔬 Usage Examples
6972

70-
### C++ 예시
73+
### C++ Example
7174

7275
```cpp
7376
BitArray a({0b11000000}, 3);
74-
a.print(); // 출력: 110
77+
a.print(); // Output: 110
7578

7679
BitArray b({0b01000000}, 2);
7780
auto c = a + b;
78-
c.print(); // 출력: 11001
81+
c.print(); // Output: 11001
7982
```
8083
81-
### Python 예시
84+
### Python Example
8285
8386
```python
8487
bit_array = BitArray([0b11000000], 8)
85-
bit_array.print() # 출력: 1100 0000
88+
bit_array.print() # Output: 1100 0000
8689
8790
sub_array = bit_array.get(2, 3)
88-
sub_array.print() # 출력: 000
91+
sub_array.print() # Output: 000
8992
```
9093

9194
---
9295

93-
## 🔧 설치 및 실행
96+
## 🔧 Installation and Execution
9497

9598
### C++
9699
```bash
@@ -102,18 +105,18 @@ g++ main.cpp -std=c++17 -o bitarray
102105
### Python
103106
```bash
104107
cd python
105-
python3 BitArray.py # 내부에서 runTests() 실행 가능
108+
python3 BitArray.py # Runs runTests() internally
106109
```
107110

108111
---
109112

110-
## 🧪 테스트
113+
## 🧪 Testing
111114

112-
각 구현에 단위 테스트 코드 포함되어 있어, 실행 시 기능이 정상 동작하는지 확인할 수 있습니다.
115+
Each implementation includes unit test code to verify functionality upon execution.
113116

114117
---
115118

116-
## 📜 라이선스
119+
## 📜 License
117120

118121
- MIT License
119122
- https://github.com/JayTwoLab/BitArray

0 commit comments

Comments
 (0)