{"id":29871377,"url":"https://github.com/jaytwolab/bitarray","last_synced_at":"2025-07-30T19:45:10.262Z","repository":{"id":305016106,"uuid":"893764916","full_name":"JayTwoLab/BitArray","owner":"JayTwoLab","description":"bit-level data manipulation and management for C++ and Python :kr: C++와 파이썬이 지원되는 비트 단위 데이터 조작 및 관리","archived":false,"fork":false,"pushed_at":"2025-07-16T11:49:08.000Z","size":73,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-28T22:00:47.635Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JayTwoLab.png","metadata":{"files":{"readme":"README.ko.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-25T07:05:18.000Z","updated_at":"2025-07-21T01:19:37.000Z","dependencies_parsed_at":"2025-07-18T00:06:47.047Z","dependency_job_id":null,"html_url":"https://github.com/JayTwoLab/BitArray","commit_stats":null,"previous_names":["jaytwolab/bitarray"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/JayTwoLab/BitArray","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayTwoLab%2FBitArray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayTwoLab%2FBitArray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayTwoLab%2FBitArray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayTwoLab%2FBitArray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JayTwoLab","download_url":"https://codeload.github.com/JayTwoLab/BitArray/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayTwoLab%2FBitArray/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267929459,"owners_count":24167453,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-30T19:45:06.531Z","updated_at":"2025-07-30T19:45:10.254Z","avatar_url":"https://github.com/JayTwoLab.png","language":"C++","readme":"# `BitArray`\n\n\u003e *Read this in other languages: [English](README.md), :kr: [Korean](README.ko.md)\n\n\u003cbr /\u003e\n\n`BitArray`는 **비트 단위 데이터 조작 및 관리**를 위한 경량 클래스 입니다.  \n**C++** 및 **Python** 두 언어로 구현되어 있으며, 네트워크, 데이터 압축, 바이너리 분석 등의 분야에서 활용 가능합니다.\n\n## 📁 프로젝트 구조\n\n```\nBitArray-main/\n├── cpp/             # C++ 구현\n│   ├── main.cpp\n│   └── README.md\n├── python/          # Python 구현\n│   ├── BitArray.py\n│   └── README.md\n├── README.md        # 프로젝트 소개 문서\n├── LICENSE\n└── .gitignore\n```\n\n---\n\n## 💡 기능 요약\n\n| 기능          | 설명                                                                 |\n|---------------|----------------------------------------------------------------------|\n| 비트 초기화   | 바이트 배열 또는 비트 크기를 기반으로 비트 배열 생성                |\n| 비트 추출     | 특정 오프셋과 길이에 따라 부분 비트 배열 추출                        |\n| 비트 병합     | 다른 비트 배열을 지정 위치에 병합 가능                               |\n| 비트 연산     | `+`, `\u003c\u003c`, `\u003e\u003e` 연산자 지원                                          |\n| 비트 반전     | 비트 순서를 역으로 뒤집는 `reverser()` 지원                         |\n| 시각화        | 사람이 읽기 쉬운 형식으로 비트 출력 (`print`, `dump`)               |\n| 유닛 테스트   | 다양한 연산에 대한 테스트 코드 포함                                  |\n\n---\n\n## 🧠 언어별 구현\n\n### ✅ C++\n\n- 구현 파일: `cpp/`\n- 주요 클래스: `BitArray`\n- STL 기반 고성능 구현\n- 단위 테스트 포함 (main.cpp)\n- 주요 특징:\n  - `std::vector\u003cuint8_t\u003e` 기반 저장\n  - `get`, `merge`, `toArray`, `dump` 등 다양한 비트 처리 메서드 제공\n\n📄 자세한 내용: [`cpp/README.ko.md`](cpp/README.ko.md)\n\n---\n\n### ✅ Python\n\n- 구현 파일: `python/`\n- 주요 클래스: `BitArray`\n- 파이썬 리스트와 비트 조작을 통한 구현\n- 주요 특징:\n  - 비트 배열 병합 및 추출\n  - `to_array`, `to_int_array`, `reverser`, `__add__`, `__rshift__`, `__lshift__` 지원\n  - 단위 테스트 함수 포함\n\n📄 자세한 내용: [`python/README.ko.md`](python/README.ko.md)\n\n---\n\n## 🔬 사용 예시\n\n### C++ 예시\n\n```cpp\nBitArray a({0b11000000}, 3);\na.print();  // 출력: 110\n\nBitArray b({0b01000000}, 2);\nauto c = a + b;\nc.print();  // 출력: 11001\n```\n\n### Python 예시\n\n```python\nbit_array = BitArray([0b11000000], 8)\nbit_array.print()  # 출력: 1100 0000\n\nsub_array = bit_array.get(2, 3)\nsub_array.print()  # 출력: 000\n```\n\n---\n\n## 🔧 설치 및 실행\n\n### C++\n```bash\ncd cpp\ng++ main.cpp -std=c++17 -o bitarray\n./bitarray\n```\n\n### Python\n```bash\ncd python\npython3 BitArray.py  # 내부에서 runTests() 실행 가능\n```\n\n---\n\n## 🧪 테스트\n\n각 구현에 단위 테스트 코드 포함되어 있어, 실행 시 기능이 정상 동작하는지 확인할 수 있습니다.\n\n---\n\n## 📜 라이선스\n\n- MIT License\n- https://github.com/JayTwoLab/BitArray\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaytwolab%2Fbitarray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaytwolab%2Fbitarray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaytwolab%2Fbitarray/lists"}