Update 5 files

- /_data/other_repo_list.csv
- /_data/links.csv
- /_posts/2026-10-01-quine.md
- /_tools/blogquine.py
- /assets/js/pjax.js
master
mayx 3 hours ago
parent 932e310f9d
commit 303f5df01c

@ -26,3 +26,4 @@ RavelloH's Blog,https://ravelloh.com,https://ravelloh.com/feed.xml,Beginning of
EXYONE@BLOG:~$,https://exyon.ee,https://exyon.ee/feed.xml,一隅藏天地,流水遇知音。 EXYONE@BLOG:~$,https://exyon.ee,https://exyon.ee/feed.xml,一隅藏天地,流水遇知音。
小景,https://jingyuan-zheng.github.io/zh/,https://jingyuan-zheng.github.io/zh/index.xml,随心分享有趣的技术、开源项目与生活记录。 小景,https://jingyuan-zheng.github.io/zh/,https://jingyuan-zheng.github.io/zh/index.xml,随心分享有趣的技术、开源项目与生活记录。
热汤茶馆,https://blog.hotsouprealm.top/,https://blog.hotsouprealm.top/atom.xml,茶凉了可以续,话断了可以接,这里是hahahotsoup的茶馆。 热汤茶馆,https://blog.hotsouprealm.top/,https://blog.hotsouprealm.top/atom.xml,茶凉了可以续,话断了可以接,这里是hahahotsoup的茶馆。
FGHRSH 日记簿,https://www.fghrsh.net/,https://www.fghrsh.net/feed.php,把喜欢的东西都记下来···

1 title link feed_url description
26 EXYONE@BLOG:~$ https://exyon.ee https://exyon.ee/feed.xml 一隅藏天地,流水遇知音。
27 小景 https://jingyuan-zheng.github.io/zh/ https://jingyuan-zheng.github.io/zh/index.xml 随心分享有趣的技术、开源项目与生活记录。
28 热汤茶馆 https://blog.hotsouprealm.top/ https://blog.hotsouprealm.top/atom.xml 茶凉了可以续,话断了可以接,这里是hahahotsoup的茶馆。
29 FGHRSH 日记簿 https://www.fghrsh.net/ https://www.fghrsh.net/feed.php 把喜欢的东西都记下来···

@ -4,6 +4,7 @@ http://git.dkforestseeaaq2dqz2uflmlsybvnq2irzn4ygyvu53oazyorednviid.onion/mayx/b
http://giteabolfdejtdzblkooalqei6jr67imiugmhtsh6ocw4hlj5a4q.b32.i2p/mayx/blog http://giteabolfdejtdzblkooalqei6jr67imiugmhtsh6ocw4hlj5a4q.b32.i2p/mayx/blog
https://gitlab.lain.la/mayx/mayx.pages.lain.la https://gitlab.lain.la/mayx/mayx.pages.lain.la
https://gitplac.si/mayx/mayx.gitpage.si https://gitplac.si/mayx/mayx.gitpage.si
https://git.32bit.cafe/mayx/blog
https://gitnet.fr/mayx/blog https://gitnet.fr/mayx/blog
https://opencommit.eu/mayx/blog https://opencommit.eu/mayx/blog
https://forge.fedoraproject.org/mabbs/blog https://forge.fedoraproject.org/mabbs/blog
@ -31,16 +32,13 @@ http://116.236.50.103:8789/mayx/blog
https://repo.gusdya.net/mayx/blog https://repo.gusdya.net/mayx/blog
https://gitea.synapsetec.cn/mayx/blog https://gitea.synapsetec.cn/mayx/blog
http://gitea.yunshanghub.com:8081/mayx/blog http://gitea.yunshanghub.com:8081/mayx/blog
http://113.177.27.200:2033/mayx/blog
http://152.69.204.151:3000/mayx/blog http://152.69.204.151:3000/mayx/blog
http://187.216.152.151:9999/mayx/blog http://187.216.152.151:9999/mayx/blog
http://116.63.173.179:8001/mayx/blog http://116.63.173.179:8001/mayx/blog
https://git.furcom.org/mayx/blog https://git.furcom.org/mayx/blog
https://git.karma-riuk.com/mayx/blog https://git.karma-riuk.com/mayx/blog
https://git.7o9o.net/mayx/blog
https://git.gupaoedu.cn/mayx/blog https://git.gupaoedu.cn/mayx/blog
https://git.7milch.com/mayx/blog https://git.7milch.com/mayx/blog
https://gitea.sciotech.cn/mayx/blog
https://gitea.micro-stack.org/mayx/blog https://gitea.micro-stack.org/mayx/blog
http://106.54.211.95:3000/mayx/blog http://106.54.211.95:3000/mayx/blog
http://172.172.102.93:3000/mayx/blog http://172.172.102.93:3000/mayx/blog
@ -64,11 +62,9 @@ http://8.130.135.159:3000/mayx/blog
https://git.dshkabatur.ru/mayx/blog https://git.dshkabatur.ru/mayx/blog
http://47.103.78.70:3000/mayx/blog http://47.103.78.70:3000/mayx/blog
http://194.5.152.156:3000/mayx/blog http://194.5.152.156:3000/mayx/blog
http://58.65.162.118:3000/mayx/blog
https://git.arkon.solutions/mayx/blog https://git.arkon.solutions/mayx/blog
https://gitea.yimoyuyan.cn/mayx/blog https://gitea.yimoyuyan.cn/mayx/blog
http://221.203.14.217:3000/mayx/blog http://221.203.14.217:3000/mayx/blog
https://dev.kiramtech.com/mayx/blog
https://git.f4e.lol/mayx/blog https://git.f4e.lol/mayx/blog
http://72.61.229.93:4000/mayx/blog http://72.61.229.93:4000/mayx/blog
http://39.101.74.135:5000/mayx/blog_cn http://39.101.74.135:5000/mayx/blog_cn
@ -80,20 +76,16 @@ http://45.55.138.82:3000/mayx/blog_cn
http://118.24.129.148:3000/mayx/blog_cn http://118.24.129.148:3000/mayx/blog_cn
http://120.48.141.82:3000/mayx/blog_cn http://120.48.141.82:3000/mayx/blog_cn
http://175.27.229.211:3000/mayx/blog_cn http://175.27.229.211:3000/mayx/blog_cn
https://git.yidaimingjvn.xyz/mayx/blog_cn
http://39.105.67.143:3000/mayx/blog_cn http://39.105.67.143:3000/mayx/blog_cn
http://82.156.89.21:3000/mayx/blog_cn http://82.156.89.21:3000/mayx/blog_cn
http://xujiesoft.vicp.net:3000/mayx/blog_cn http://xujiesoft.vicp.net:3000/mayx/blog_cn
https://git.mingliqiye.com/mayx/blog_cn
http://58.213.60.6:19000/mayx/blog_cn http://58.213.60.6:19000/mayx/blog_cn
http://47.92.113.131:3000/mayx/blog http://47.92.113.131:3000/mayx/blog
http://gyc.myds.me:4000/mayx/blog http://gyc.myds.me:4000/mayx/blog
https://git.graveyard.sh/mayx/blog https://git.graveyard.sh/mayx/blog
https://gitea.jnyuxia.com/mayx/blog https://gitea.jnyuxia.com/mayx/blog
https://gitea.mynas-lechner.de/mayx/blog
https://gitlab.iplusus.com/mayx/blog https://gitlab.iplusus.com/mayx/blog
https://git.miasma-os.com/mayx/blog https://git.miasma-os.com/mayx/blog
https://git.zakum.cn/mayx/blog
http://47.109.103.110:9000/mayx/blog_cn http://47.109.103.110:9000/mayx/blog_cn
http://47.104.241.192:19999/mayx/blog_cn http://47.104.241.192:19999/mayx/blog_cn
http://47.98.148.146:1026/mayx/blog_cn http://47.98.148.146:1026/mayx/blog_cn
@ -106,12 +98,9 @@ http://47.106.222.181:20511/mayx/blog_cn
http://118.24.161.24:3000/mayx/blog_cn http://118.24.161.24:3000/mayx/blog_cn
http://36.138.125.206:3000/mayx/blog_cn http://36.138.125.206:3000/mayx/blog_cn
https://git.crystalyx.net/mayx/blog https://git.crystalyx.net/mayx/blog
https://gitea.grxe.io/mayx/blog
https://gitea.accept.dev.dbf.nl/mayx/blog
https://barhoum-lab.fr/mayx/blog https://barhoum-lab.fr/mayx/blog
http://gitea.snailtrack.cn/mayx/blog_cn http://gitea.snailtrack.cn/mayx/blog_cn
https://code.draussenfunker.de/mayx/blog_cn https://code.draussenfunker.de/mayx/blog_cn
https://git.dinsor.co.th/mayx/blog
http://www.bkandssp.cn:30/mayx/blog http://www.bkandssp.cn:30/mayx/blog
http://gitea.ydxtool.com/mayx/blog http://gitea.ydxtool.com/mayx/blog
https://gitea.malxte.de/mayx/blog https://gitea.malxte.de/mayx/blog
@ -129,7 +118,6 @@ https://git.libregaming.org/mayx/blog
https://git.kaki87.net/mayx/blog https://git.kaki87.net/mayx/blog
https://forgejo.vanten-s.com/mayx/blog https://forgejo.vanten-s.com/mayx/blog
http://124.71.169.183:3000/mayx/blog http://124.71.169.183:3000/mayx/blog
https://git.msoucy.me/mayx/blog
http://140.120.108.238:49308/mayx/blog http://140.120.108.238:49308/mayx/blog
http://git.chilidoginteractive.com:3000/mayx/blog_cn http://git.chilidoginteractive.com:3000/mayx/blog_cn
https://git.panda-number.one/mayx/blog https://git.panda-number.one/mayx/blog
@ -138,7 +126,6 @@ https://gitea.keymantek.com:777/mayx/blog
https://git.tirtapakuan.co.id/mayx/blog https://git.tirtapakuan.co.id/mayx/blog
http://tian-you.top:7020/mayx/blog http://tian-you.top:7020/mayx/blog
http://34.17.182.140/mayx-gogs/blog http://34.17.182.140/mayx-gogs/blog
http://gitea.mikarsoft.com/mayx/blog
https://mcgit.place/mayx/blog https://mcgit.place/mayx/blog
https://forgejo.rekallservices.com/mayx/blog https://forgejo.rekallservices.com/mayx/blog
http://git.instal.org.cn/mayx/blog http://git.instal.org.cn/mayx/blog
@ -149,7 +136,6 @@ https://git.netzbyte.com/mayx/blog
https://ataymakhzan.com/mayx/blog https://ataymakhzan.com/mayx/blog
https://repo.qruize.com/mayx/blog https://repo.qruize.com/mayx/blog
https://git.xneon.org/mayx/blog https://git.xneon.org/mayx/blog
https://git.lamby.gay/mayx/blog
https://lab.dutt.ch/mayx/blog https://lab.dutt.ch/mayx/blog
https://gitea.dabit.synology.me/mayx/blog https://gitea.dabit.synology.me/mayx/blog
https://git.joinplu.me/mayx/blog https://git.joinplu.me/mayx/blog
@ -170,12 +156,10 @@ https://devcraft-dot.tech/mayx/blog
https://a-t-g.ru/mayx/blog https://a-t-g.ru/mayx/blog
http://wangbeibei.xyz:6002/mayx/blog http://wangbeibei.xyz:6002/mayx/blog
http://8.141.82.163:20000/mayx/blog_cn http://8.141.82.163:20000/mayx/blog_cn
http://81.70.30.91:3000/mayx/blog_cn
http://yidaima.cn:6008/mayx/blog_cn http://yidaima.cn:6008/mayx/blog_cn
http://8.148.31.14:3000/mayx/blog_cn http://8.148.31.14:3000/mayx/blog_cn
http://58.17.14.95:8001/mayx/blog_cn http://58.17.14.95:8001/mayx/blog_cn
http://39.99.175.172:8000/mayx/blog_cn http://39.99.175.172:8000/mayx/blog_cn
https://gitea.detr.top/mayx/blog_cn
http://175.178.193.35:3000/mayx/blog_cn http://175.178.193.35:3000/mayx/blog_cn
http://gitea.jb1000.com:88/mayx/blog_cn http://gitea.jb1000.com:88/mayx/blog_cn
http://www.22ai.vip/mayx/blog_cn http://www.22ai.vip/mayx/blog_cn
@ -185,19 +169,12 @@ http://62.234.20.54:3000/mayx/blog_cn
https://gitea.4gunn.cn:52443/mayx/blog_cn https://gitea.4gunn.cn:52443/mayx/blog_cn
http://jdunlap.com/mayx/blog http://jdunlap.com/mayx/blog
https://git.silica.codes/mayx/blog https://git.silica.codes/mayx/blog
https://www.vitelgrid.app/mayx/blog
https://gitruhub.ru/mayx/blog https://gitruhub.ru/mayx/blog
https://git.techworkshop42.ru/mayx/blog
http://speedyfox.app/mayx/blog
https://mjjtop.com/mayx/blog https://mjjtop.com/mayx/blog
https://forgejo.wanderingmonster.dev/mayx/blog https://forgejo.wanderingmonster.dev/mayx/blog
https://git.edavmig.ru/mayx/blog
https://gitea.ns5001k.sigma2.no/mayx/blog https://gitea.ns5001k.sigma2.no/mayx/blog
https://git.hemangvyas.com/mayx/blog https://git.hemangvyas.com/mayx/blog
https://gitav.ru/mayx/blog https://gitav.ru/mayx/blog
https://git.sakuzyo.net/mayx/blog
http://www.365rise.top/mayx/blog
https://git.ifuntanhub.dev/mayx/blog
https://git.aptcloud.ru/mayx/blog https://git.aptcloud.ru/mayx/blog
https://gitlab.dev.genai-team.ru/mayx/blog https://gitlab.dev.genai-team.ru/mayx/blog
https://git.umervtilte.lol/mayx/blog https://git.umervtilte.lol/mayx/blog
@ -212,17 +189,23 @@ http://81.69.57.215:3000/mayx/blog_cn
https://git.dglyoo.com/mayx/blog_cn https://git.dglyoo.com/mayx/blog_cn
http://c8202.top:3000/mayx/blog_cn http://c8202.top:3000/mayx/blog_cn
http://nojava.fun/mayx/blog_cn http://nojava.fun/mayx/blog_cn
https://gitimn.com/mayx/blog
https://git.resacachile.cl/mayx/blog
https://git.vycsucre.gob.ve/mayx/blog https://git.vycsucre.gob.ve/mayx/blog
https://newtrafficworksgit.online/mayx/blog https://newtrafficworksgit.online/mayx/blog
https://git.uj-s.com/mayx/blog https://git.uj-s.com/mayx/blog
https://git.albiobola.nl/mayx/blog https://git.albiobola.nl/mayx/blog
http://gitea.amm.ar/mayx/blog
https://git.83channel.net/mayx/blog https://git.83channel.net/mayx/blog
https://git.zeppone.com/mayx/blog
https://repo.paperless.rs/mayx/blog https://repo.paperless.rs/mayx/blog
https://urbal.dev/mayx/blog https://urbal.dev/mayx/blog
https://git.pwarde.nl/mayx/blog https://git.pwarde.nl/mayx/blog
https://bolha.dev/mayx/blog https://bolha.dev/mayx/blog
https://git.checkerwars.com/mayx/blog https://git.checkerwars.com/mayx/blog
https://git.broderlands.com/mayx/blog
https://gitea.schwegmann.tech/mayx/blog
https://veretium.com/mayx/blog
https://gitea.kcm-nixi.cn:32443/mayx/blog
https://git.riskreduction.net/mayx/blog
https://git.twitchmagic.pro/mayx/blog
https://gitea.ctmp.ir/mayx/blog
https://gitea.marcin00.pl/mayx/blog
https://git.imagitech.mx/mayx/blog
https://git.hidosi.ru/mayx/blog

1 repo_url
4 http://giteabolfdejtdzblkooalqei6jr67imiugmhtsh6ocw4hlj5a4q.b32.i2p/mayx/blog
5 https://gitlab.lain.la/mayx/mayx.pages.lain.la
6 https://gitplac.si/mayx/mayx.gitpage.si
7 https://git.32bit.cafe/mayx/blog
8 https://gitnet.fr/mayx/blog
9 https://opencommit.eu/mayx/blog
10 https://forge.fedoraproject.org/mabbs/blog
32 https://repo.gusdya.net/mayx/blog
33 https://gitea.synapsetec.cn/mayx/blog
34 http://gitea.yunshanghub.com:8081/mayx/blog
http://113.177.27.200:2033/mayx/blog
35 http://152.69.204.151:3000/mayx/blog
36 http://187.216.152.151:9999/mayx/blog
37 http://116.63.173.179:8001/mayx/blog
38 https://git.furcom.org/mayx/blog
39 https://git.karma-riuk.com/mayx/blog
https://git.7o9o.net/mayx/blog
40 https://git.gupaoedu.cn/mayx/blog
41 https://git.7milch.com/mayx/blog
https://gitea.sciotech.cn/mayx/blog
42 https://gitea.micro-stack.org/mayx/blog
43 http://106.54.211.95:3000/mayx/blog
44 http://172.172.102.93:3000/mayx/blog
62 https://git.dshkabatur.ru/mayx/blog
63 http://47.103.78.70:3000/mayx/blog
64 http://194.5.152.156:3000/mayx/blog
http://58.65.162.118:3000/mayx/blog
65 https://git.arkon.solutions/mayx/blog
66 https://gitea.yimoyuyan.cn/mayx/blog
67 http://221.203.14.217:3000/mayx/blog
https://dev.kiramtech.com/mayx/blog
68 https://git.f4e.lol/mayx/blog
69 http://72.61.229.93:4000/mayx/blog
70 http://39.101.74.135:5000/mayx/blog_cn
76 http://118.24.129.148:3000/mayx/blog_cn
77 http://120.48.141.82:3000/mayx/blog_cn
78 http://175.27.229.211:3000/mayx/blog_cn
https://git.yidaimingjvn.xyz/mayx/blog_cn
79 http://39.105.67.143:3000/mayx/blog_cn
80 http://82.156.89.21:3000/mayx/blog_cn
81 http://xujiesoft.vicp.net:3000/mayx/blog_cn
https://git.mingliqiye.com/mayx/blog_cn
82 http://58.213.60.6:19000/mayx/blog_cn
83 http://47.92.113.131:3000/mayx/blog
84 http://gyc.myds.me:4000/mayx/blog
85 https://git.graveyard.sh/mayx/blog
86 https://gitea.jnyuxia.com/mayx/blog
https://gitea.mynas-lechner.de/mayx/blog
87 https://gitlab.iplusus.com/mayx/blog
88 https://git.miasma-os.com/mayx/blog
https://git.zakum.cn/mayx/blog
89 http://47.109.103.110:9000/mayx/blog_cn
90 http://47.104.241.192:19999/mayx/blog_cn
91 http://47.98.148.146:1026/mayx/blog_cn
98 http://118.24.161.24:3000/mayx/blog_cn
99 http://36.138.125.206:3000/mayx/blog_cn
100 https://git.crystalyx.net/mayx/blog
https://gitea.grxe.io/mayx/blog
https://gitea.accept.dev.dbf.nl/mayx/blog
101 https://barhoum-lab.fr/mayx/blog
102 http://gitea.snailtrack.cn/mayx/blog_cn
103 https://code.draussenfunker.de/mayx/blog_cn
https://git.dinsor.co.th/mayx/blog
104 http://www.bkandssp.cn:30/mayx/blog
105 http://gitea.ydxtool.com/mayx/blog
106 https://gitea.malxte.de/mayx/blog
118 https://git.kaki87.net/mayx/blog
119 https://forgejo.vanten-s.com/mayx/blog
120 http://124.71.169.183:3000/mayx/blog
https://git.msoucy.me/mayx/blog
121 http://140.120.108.238:49308/mayx/blog
122 http://git.chilidoginteractive.com:3000/mayx/blog_cn
123 https://git.panda-number.one/mayx/blog
126 https://git.tirtapakuan.co.id/mayx/blog
127 http://tian-you.top:7020/mayx/blog
128 http://34.17.182.140/mayx-gogs/blog
http://gitea.mikarsoft.com/mayx/blog
129 https://mcgit.place/mayx/blog
130 https://forgejo.rekallservices.com/mayx/blog
131 http://git.instal.org.cn/mayx/blog
136 https://ataymakhzan.com/mayx/blog
137 https://repo.qruize.com/mayx/blog
138 https://git.xneon.org/mayx/blog
https://git.lamby.gay/mayx/blog
139 https://lab.dutt.ch/mayx/blog
140 https://gitea.dabit.synology.me/mayx/blog
141 https://git.joinplu.me/mayx/blog
156 https://a-t-g.ru/mayx/blog
157 http://wangbeibei.xyz:6002/mayx/blog
158 http://8.141.82.163:20000/mayx/blog_cn
http://81.70.30.91:3000/mayx/blog_cn
159 http://yidaima.cn:6008/mayx/blog_cn
160 http://8.148.31.14:3000/mayx/blog_cn
161 http://58.17.14.95:8001/mayx/blog_cn
162 http://39.99.175.172:8000/mayx/blog_cn
https://gitea.detr.top/mayx/blog_cn
163 http://175.178.193.35:3000/mayx/blog_cn
164 http://gitea.jb1000.com:88/mayx/blog_cn
165 http://www.22ai.vip/mayx/blog_cn
169 https://gitea.4gunn.cn:52443/mayx/blog_cn
170 http://jdunlap.com/mayx/blog
171 https://git.silica.codes/mayx/blog
https://www.vitelgrid.app/mayx/blog
172 https://gitruhub.ru/mayx/blog
https://git.techworkshop42.ru/mayx/blog
http://speedyfox.app/mayx/blog
173 https://mjjtop.com/mayx/blog
174 https://forgejo.wanderingmonster.dev/mayx/blog
https://git.edavmig.ru/mayx/blog
175 https://gitea.ns5001k.sigma2.no/mayx/blog
176 https://git.hemangvyas.com/mayx/blog
177 https://gitav.ru/mayx/blog
https://git.sakuzyo.net/mayx/blog
http://www.365rise.top/mayx/blog
https://git.ifuntanhub.dev/mayx/blog
178 https://git.aptcloud.ru/mayx/blog
179 https://gitlab.dev.genai-team.ru/mayx/blog
180 https://git.umervtilte.lol/mayx/blog
189 https://git.dglyoo.com/mayx/blog_cn
190 http://c8202.top:3000/mayx/blog_cn
191 http://nojava.fun/mayx/blog_cn
https://gitimn.com/mayx/blog
https://git.resacachile.cl/mayx/blog
192 https://git.vycsucre.gob.ve/mayx/blog
193 https://newtrafficworksgit.online/mayx/blog
194 https://git.uj-s.com/mayx/blog
195 https://git.albiobola.nl/mayx/blog
http://gitea.amm.ar/mayx/blog
196 https://git.83channel.net/mayx/blog
https://git.zeppone.com/mayx/blog
197 https://repo.paperless.rs/mayx/blog
198 https://urbal.dev/mayx/blog
199 https://git.pwarde.nl/mayx/blog
200 https://bolha.dev/mayx/blog
201 https://git.checkerwars.com/mayx/blog
202 https://git.broderlands.com/mayx/blog
203 https://gitea.schwegmann.tech/mayx/blog
204 https://veretium.com/mayx/blog
205 https://gitea.kcm-nixi.cn:32443/mayx/blog
206 https://git.riskreduction.net/mayx/blog
207 https://git.twitchmagic.pro/mayx/blog
208 https://gitea.ctmp.ir/mayx/blog
209 https://gitea.marcin00.pl/mayx/blog
210 https://git.imagitech.mx/mayx/blog
211 https://git.hidosi.ru/mayx/blog

File diff suppressed because it is too large Load Diff

@ -12,8 +12,8 @@ import time
# ============================================================ # ============================================================
# Part 1: 最小 LZMA1 range coder(只做编码) # Part 1: 最小 LZMA1 range coder(只做编码)
# #
# 设计目标:只实现 quine 构造需要的 token:literal / match / rep0-match / # 设计目标:只实现 quine 构造需要的 token:match / rep0-match,
# end-marker,编码字节与历史内容无关(不维护输出历史), # 编码字节与历史内容无关(不维护输出历史),
# 这是"先算结构、后填数据"两阶段装配的基础。 # 这是"先算结构、后填数据"两阶段装配的基础。
# 参考:Igor Pavlov 的 LZMA SDK (LzmaEnc.c / LzmaDec.c)。 # 参考:Igor Pavlov 的 LZMA SDK (LzmaEnc.c / LzmaDec.c)。
# ============================================================ # ============================================================
@ -126,27 +126,21 @@ def _pos_slot_and_bits(d):
class LzmaEncoder: class LzmaEncoder:
def __init__(self, lc=3, lp=0, pb=2): def __init__(self, pb=2):
""" """
不维护输出假历史:match 的编码字节只取决于 (dist,len,pos),与历史内容无关, 不维护输出假历史:match 的编码字节只取决于 (dist,len,pos),与历史内容无关,
因此 quine 构造(先算结构、后填数据)不需要逐字节复制假历史。 因此 quine 构造(先算结构、后填数据)不需要逐字节复制假历史。
""" """
self.lc, self.lp, self.pb = lc, lp, pb self.pb = pb
self.pos_mask = (1 << pb) - 1 self.pos_mask = (1 << pb) - 1
self.lp_mask = (1 << lp) - 1
self.rc = RangeEncoder() self.rc = RangeEncoder()
self.pos = 0 # 已输出字节数 self.pos = 0 # 已输出字节数
self.state = 0 self.state = 0
self.prev_byte = 0
self.reps = [0, 0, 0, 0] # rep0..rep3,存的是 0 基距离
self.out = bytearray()
# 概率模型 # 概率模型
n = PROB_INIT n = PROB_INIT
self.p_is_match = [n] * (kNumStates << kNumPosBitsMax) self.p_is_match = [n] * (kNumStates << kNumPosBitsMax)
self.p_is_rep = [n] * kNumStates self.p_is_rep = [n] * kNumStates
self.p_is_rep_g0 = [n] * kNumStates self.p_is_rep_g0 = [n] * kNumStates
self.p_is_rep_g1 = [n] * kNumStates
self.p_is_rep_g2 = [n] * kNumStates
self.p_rep0_long = [n] * (kNumStates << kNumPosBitsMax) self.p_rep0_long = [n] * (kNumStates << kNumPosBitsMax)
self.p_pos_slot = [n] * (kNumLenToPosStates << kNumPosSlotBits) self.p_pos_slot = [n] * (kNumLenToPosStates << kNumPosSlotBits)
self.p_spec_pos = [n] * (kNumFullDistances - kEndPosModelIndex) # 114 self.p_spec_pos = [n] * (kNumFullDistances - kEndPosModelIndex) # 114
@ -159,7 +153,6 @@ class LzmaEncoder:
self.p_rep_len_low = [n] * (16 * kNumLowLenSymbols) self.p_rep_len_low = [n] * (16 * kNumLowLenSymbols)
self.p_rep_len_mid = [n] * (16 * kNumMidLenSymbols) self.p_rep_len_mid = [n] * (16 * kNumMidLenSymbols)
self.p_rep_len_high = [n] * (1 << kNumHighLenBits) self.p_rep_len_high = [n] * (1 << kNumHighLenBits)
self.p_lit = [n] * (0x300 << (lc + lp))
# ---------- 内部 ---------- # ---------- 内部 ----------
@property @property
@ -184,25 +177,6 @@ class LzmaEncoder:
self.rc.bittree_encode(high, 0, kNumHighLenBits, l - kNumMidLenSymbols) self.rc.bittree_encode(high, 0, kNumHighLenBits, l - kNumMidLenSymbols)
# ---------- 对外 token ---------- # ---------- 对外 token ----------
def literal(self, b):
if self.state >= kNumLitStates:
raise NotImplementedError("matched-literal 未实现(quine 构造不需要)")
# 每个符号先编 isMatch 位:0 表示这是 literal
ps = self.pos_state
self.rc.encode_bit(self.p_is_match, (self.state << kNumPosBitsMax) + ps, 0)
lit_state = ((self.pos & self.lp_mask) << self.lc) + (self.prev_byte >> (8 - self.lc))
self.rc.bittree_encode(self.p_lit, lit_state * 0x300, 8, b)
self.out.append(b)
self.prev_byte = b
self.pos += 1
# UpdateState_Literal
if self.state <= 3:
self.state = 0
elif self.state <= 9:
self.state -= 3
else:
self.state -= 6
def _write_dist(self, dist, lts): def _write_dist(self, dist, lts):
d = dist - 1 d = dist - 1
slot, n, low_bits = _pos_slot_and_bits(d) slot, n, low_bits = _pos_slot_and_bits(d)
@ -217,7 +191,6 @@ class LzmaEncoder:
self.rc.encode_direct_bits(low_bits >> kNumAlignBits, n - kNumAlignBits) self.rc.encode_direct_bits(low_bits >> kNumAlignBits, n - kNumAlignBits)
self.rc.bittree_reverse_encode(self.p_align, 0, kNumAlignBits, self.rc.bittree_reverse_encode(self.p_align, 0, kNumAlignBits,
low_bits & ((1 << kNumAlignBits) - 1)) low_bits & ((1 << kNumAlignBits) - 1))
return d
def match(self, dist, length): def match(self, dist, length):
assert kMatchMinLen <= length <= 273, length assert kMatchMinLen <= length <= 273, length
@ -227,11 +200,9 @@ class LzmaEncoder:
lts = min(length - kMatchMinLen, kNumLenToPosStates - 1) lts = min(length - kMatchMinLen, kNumLenToPosStates - 1)
self._encode_len(self.p_len_choice, self._encode_len(self.p_len_choice,
self.p_len_low, self.p_len_mid, self.p_len_high, length) self.p_len_low, self.p_len_mid, self.p_len_high, length)
d = self._write_dist(dist, lts) self._write_dist(dist, lts)
# 状态与 rep 链更新 # 状态更新
self.state = 7 if self.state < kNumLitStates else 10 self.state = 7 if self.state < kNumLitStates else 10
self.reps[3], self.reps[2], self.reps[1], self.reps[0] = \
self.reps[2], self.reps[1], self.reps[0], d
self.pos += length self.pos += length
def rep_match(self, length): def rep_match(self, length):
@ -247,16 +218,6 @@ class LzmaEncoder:
self.state = 8 if self.state < kNumLitStates else 11 self.state = 8 if self.state < kNumLitStates else 11
self.pos += length self.pos += length
def end(self):
"""LZMA 结束标记:编码一个 0 基距离为 0xFFFFFFFF 的 match。"""
ps = self.pos_state
self.rc.encode_bit(self.p_is_match, (self.state << kNumPosBitsMax) + ps, 1)
self.rc.encode_bit(self.p_is_rep, self.state, 0)
self._encode_len(self.p_len_choice,
self.p_len_low, self.p_len_mid, self.p_len_high, kMatchMinLen)
self._write_dist(0x100000000, 0)
self.state = 7 if self.state < kNumLitStates else 10
def finish(self): def finish(self):
return self.rc.finish() return self.rc.finish()
@ -374,7 +335,7 @@ class BlogQuine:
for dirpath, dirnames, filenames in os.walk(root): for dirpath, dirnames, filenames in os.walk(root):
dirnames.sort() dirnames.sort()
for dn in dirnames: for dn in dirnames:
rel = os.path.relpath(os.path.join(dirpath, dn), root) rel = os.path.relpath(os.path.join(dirpath, dn), root).replace(os.sep, "/")
self.walk_entries.append((self._prefixed(rel), True)) self.walk_entries.append((self._prefixed(rel), True))
for fn in sorted(filenames): for fn in sorted(filenames):
p = os.path.join(dirpath, fn) p = os.path.join(dirpath, fn)

@ -116,7 +116,7 @@
// 排除列表:外链、锚点、静态资源、Live2D 目录 // 排除列表:外链、锚点、静态资源、Live2D 目录
var exclude = ':not([target="_blank"]):not([href^="http"]):not([href^="//"])' + var exclude = ':not([target="_blank"]):not([href^="http"]):not([href^="//"])' +
':not([href^="mailto"]):not([href^="#"])' + ':not([href^="mailto"]):not([href^="#"])' +
':not([href$=".xml"]):not([href$=".json"]):not([href$=".tgz"]):not([href$=".zip"])' + ':not([href$=".xml"]):not([href$=".json"]):not([href$=".7z"]):not([href$=".zip"])' +
':not([href^="/Live2dHistoire"])'; ':not([href^="/Live2dHistoire"])';
$(document).pjax('a' + exclude, PJAX_OPTS.container, PJAX_OPTS); $(document).pjax('a' + exclude, PJAX_OPTS.container, PJAX_OPTS);
$(document).on('submit', 'form#search-input-all', function (e) { $(document).on('submit', 'form#search-input-all', function (e) {

Loading…
Cancel
Save