{"id":31822923,"url":"https://github.com/devfans/bitx","last_synced_at":"2025-10-11T14:20:35.078Z","repository":{"id":98958896,"uuid":"137991262","full_name":"devfans/bitx","owner":"devfans","description":"bytes transfer via udp","archived":false,"fork":false,"pushed_at":"2019-05-24T03:34:31.000Z","size":521,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T12:38:47.346Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devfans.png","metadata":{"files":{"readme":"README.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}},"created_at":"2018-06-20T06:45:16.000Z","updated_at":"2019-05-24T03:34:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"fdd984bf-395e-43db-947b-3404f4af9dda","html_url":"https://github.com/devfans/bitx","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/devfans/bitx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devfans%2Fbitx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devfans%2Fbitx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devfans%2Fbitx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devfans%2Fbitx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devfans","download_url":"https://codeload.github.com/devfans/bitx/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devfans%2Fbitx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007496,"owners_count":26084313,"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-10-11T02:00:06.511Z","response_time":55,"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-10-11T14:20:28.802Z","updated_at":"2025-10-11T14:20:35.071Z","avatar_url":"https://github.com/devfans.png","language":"Go","readme":"# bitx\n\n[![Build Status](https://travis-ci.org/devfans/bitx.svg?branch=master)](https://travis-ci.org/devfans/bitx)\n[![Go Report Card](https://goreportcard.com/badge/github.com/devfans/bitx)](https://goreportcard.com/report/github.com/devfans/bitx) [![Join the chat at https://gitter.im/devfans/bitx](https://badges.gitter.im/devfans/bitx.svg)](https://gitter.im/devfans/bitx?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nBytes transfer via pure udp. Currently supports: linux, macOS, windows. Try it: [Download](https://github.com/devfans/bitx/releases) \n\nIn some situations, a tcp connection based data transfer is unstable and has a low efficient, while with udp protocal, it can use limited resource to tranfer bytes as fast as possible. The main issue with udp tranfer is high packets loss, and no ways to get rid of it. But there are some suggestions to optimize it:\n+ Adjust the datagram size(with ```-m```) accordingly. Normally smaller datagram get lower data loss rate, when transfering data through long distance since a frame loss can cause the whole datagram to be dropped.\n+ Adjust the OS level udp buffer size. Please refer to this [gist](https://gist.github.com/devfans/b19516ec5616cacfe59156194f9b68a2)\n\n# Benchmark\n\n- Transfer a file about 100GB from Japan to China through public Internet\n\nAvg speed: 6.7MB/s\n\n```\n2019/05/23 15:50:20 Read 50200000 bytes (offset 107177000000) of file into block seq 213500000 to 213599999\n2019/05/23 15:50:24 Allocated block 2136 start 213600000 end 213699999 progress 99 %(213600000 / 213892794)\n2019/05/23 15:50:24 Read 50200000 bytes (offset 107227200000) of file into block seq 213600000 to 213699999\n2019/05/23 15:50:28 Allocated block 2137 start 213700000 end 213799999 progress 99 %(213700000 / 213892794)\n2019/05/23 15:50:28 Read 50200000 bytes (offset 107277400000) of file into block seq 213700000 to 213799999\n2019/05/23 15:50:32 Allocated block 2138 start 213800000 end 213892793 progress 99 %(213800000 / 213892794)\n2019/05/23 15:50:32 Read 46582400 bytes (offset 107327600000) of file into block seq 213800000 to 213892793\n2019/05/23 15:51:00 Job total length 107374182400\n2019/05/23 15:51:00 Finished job ./sensu.img Average speed: 6697 KB/s\n2019/05/23 15:51:00 All jobs are finished, now ending\n```\n\n- Transfer a file about 2.1GB from China to Japan through public Internet\n\nAvg speed: 3934 KB/s\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/devfans/bitx/master/benchmark_avg.png\" alt=\"benchmark avg\"/\u003e\n\u003c/p\u003e\n\nPeak at: 39MB (Potential optimization of logic can be applied)\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/devfans/bitx/master/benchmark_peak.png\" alt=\"benchmark peak\"/\u003e\n  \n# Get Started\n\n```\n./bitx -h\nUsage of ./bitx:\n  -b int\n    \tdatagrams to store in one block, set on client side (default 1000000)\n  -block int\n    \tStart at block index (default 0)\n  -bs int\n    \tblocks in memory, set on client size (default 3)\n  -c int\n    \tbatch size (default 10)\n  -d string\n    \tdirectory of files to send\n  -f value\n    \tfiles to send, multiple -f is allowed\n  -i string\n    \thost ip/remote receivor ip\n  -loop int\n    \tsession loop check interval (default 1)\n  -m int\n    \tmax datagram size in bytes, set on both size (default 512)\n  -nh\n    \tDo not verify file md5 hash\n  -p string\n    \tport (default \"1200\")\n  -r int\n    \trepeat count for shards request (default 1)\n  -s\tserve as receivor\n  -t\tOptimize output for terminal\n  -wait int\n    \tdata max wait time before send new request for it (default 3)\n```\n\nData Receivor:\n\n```\n./bitx -s \n```\n\nData Sender:\n\n```\n./bitx -i ip -p port -f file1 -f file2\n```\n\n# Terminal Display Option(-t) (The display is valid only for single file transfer)\n\n```\nbitx -f test.data -bs 1 -t\nFile test.data Seqs: 2138928/2138928 Blocks(Size 1000000MB): 2/3 Parallel: 1 (1073 MB)  \n------------------------------------------------------------------\nSent job meta for test.data id 0\nAllocated block 0 start 0 end 999999\nRead 502000000 bytes (offset 0) of file into block seq 0 to 999999\nAllocated block 1 start 1000000 end 1999999\nRead 502000000 bytes (offset 502000000) of file into block seq 1000000 to 1999999\nAllocated block 2 start 2000000 end 2138927\nRead 69741824 bytes (offset 1004000000) of file into block seq 2000000 to 2138927\nJob total length 1073741824\nFinished job test.data\nAll jobs are finished, now ending\nTransfered [============================================] 100% 10699KB/s\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevfans%2Fbitx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevfans%2Fbitx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevfans%2Fbitx/lists"}