{"id":114563,"date":"2024-03-25T18:26:02","date_gmt":"2024-03-25T16:26:02","guid":{"rendered":"https:\/\/prohoster.info\/blog\/novosti-interneta\/eksperiment-s-ispolzovaniem-sqlite-v-kachestve-kontejnera-dlya-arhivirovaniya-fajlov"},"modified":"2024-03-25T18:26:02","modified_gmt":"2024-03-25T16:26:02","slug":"eksperiment-s-ispolzovaniem-sqlite-v-kachestve-kontejnera-dlya-arhivirovaniya-fajlov","status":"publish","type":"post","link":"https:\/\/prohoster.info\/ro\/blog\/news\/eksperiment-s-ispolzovaniem-sqlite-v-kachestve-kontejnera-dlya-arhivirovaniya-fajlov","title":{"rendered":"Experiment cu utilizarea SQLite ca container pentru arhivarea fi\u0219ierelor","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Proiectul Pack a \u00eencercat s\u0103 creeze un format pentru arhivarea fi\u0219ierelor, bazat pe biblioteca SQLite \u0219i algoritmul de compresie ZSTD (Zstandard). Prototipul preg\u0103tit, scris \u00een Pascal \u0219i distribuit sub licen\u021ba Apache 2.0, a dep\u0103\u0219it \u00een vitez\u0103 crearea arhivelor fa\u021b\u0103 de cele mai comune utilitare de arhivare, av\u00e2nd ca unic scop citirea datelor, comprimarea prin biblioteca libzstd \u0219i executarea opera\u021biunilor SQL pentru ad\u0103ugarea datelor comprimate \u00een fi\u0219ierul cu baza de date SQLite.      <\/p>\n<p>La comprimarea unui director cu 81.000 de fi\u0219iere, av\u00e2nd o dimensiune total\u0103 de 1,25 GB, Pack s-a dovedit a fi de 112 ori mai rapid dec\u00e2t utilitarul ZIP, finaliz\u00e2nd opera\u021biunea \u00een 1,3 secunde fa\u021b\u0103 de cele 146 de secunde necesare pentru ZIP. Dimensiunea arhivei a fost cu 23% mai mic\u0103 pentru Pack (194 MB fa\u021b\u0103 de 253 MB pentru ZIP). Spre compara\u021bie, utilitarul tar a realizat arhivarea \u00een 4,7 secunde f\u0103r\u0103 comprimare \u0219i \u00een 28,5 secunde utiliz\u00e2nd metoda gzip, arhivatorul RAR a finalizat testul \u00een 27,5 secunde, iar 7z \u00een 54,2 secunde. Dimensiunile arhivelor au fost: tar.gz \u2014 214 MB, RAR \u2014 235 MB, 7z \u2014 135 MB. Se observ\u0103 c\u0103, \u00een ceea ce prive\u0219te viteza de dezasamblare \u0219i accesul aleator la fi\u0219iere, Pack dep\u0103\u0219e\u0219te, de asemenea, alte arhivatoare, consum\u00e2nd \u00een acela\u0219i timp mai pu\u021bin\u0103 memorie RAM. ZIP: 253 MB, 146 s 7z: 135 MB, 54,2 s mai rapid dec\u00e2t ZIP de 2,7 ori tar.gz: 214 MB, 28,5 s x 5,1 RAR: 235 MB, 27,5 s x 5,3 tar: 1345 MB, 4,7 s x 31 Pack: 194 MB, 1,3 s x 112      <\/p>\n<p>Despre influen\u021ba cache-ului de fi\u0219iere asupra rezultatelor testului nu se men\u021bioneaz\u0103. Probabil, viteza sc\u0103zut\u0103 a ZIP-ului se datoreaz\u0103 ordinii de desf\u0103\u0219urare a testelor f\u0103r\u0103 a \u021bine cont de cache-ul datelor \u00een memorie \u2014 testul cu zip a fost ini\u021biat cu un cache rece, \u00een timp ce celelalte teste au fost realizate cu un cache cald. \u00cen condi\u021bii normale, Zstandard demonstreaz\u0103 o vitez\u0103 de comprimare cu 3-5 ori mai mare comparativ cu zlib \u0219i o dezarhivare de dou\u0103 ori mai rapid\u0103, av\u00e2nd un nivel de comprimare cu 10-15% mai ridicat.       <\/p>\n<p>Completar\u0103: O idee similar\u0103 de stocare a fi\u0219ierelor comprimate sub form\u0103 de blob-uri \u00een baza de date SQLite a fost realizat\u0103 \u00een 2014 \u00een arhivatorul sqlar, creat de dezvoltatorii SQLite ca un experiment pentru a evalua eficien\u021ba stoc\u0103rii blob-urilor \u00een SQLite. \u00cen sqlar, pentru comprimare se folose\u0219te zlib \u0219i dimensiunea fi\u0219ierelor este cu aproximativ 2% mai mare dec\u00e2t cea a utilitarului ZIP.<br \/>\n<br \/>Sursa: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=60842\">opennet.ro<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041f\u0440\u043e\u0435\u043a\u0442 Pack \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u043d\u044f\u043b \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0434\u043b\u044f \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u0431\u0430\u0437\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 SQLite \u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0441\u0436\u0430\u0442\u0438\u044f ZSTD (Zstandard). \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Pascal \u0438 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u043c\u044b\u0439 \u043f\u043e\u0434 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0435\u0439 Apache 2.0, \u043e\u0431\u043e\u0433\u043d\u0430\u043b \u043f\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0432\u043e\u0432 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0435 \u0430\u0440\u0445\u0438\u0432\u0430\u0442\u043e\u0440\u044b, \u043f\u0440\u0438 \u0442\u043e\u043c, \u0447\u0442\u043e \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430 \u0441\u0432\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u043a \u0447\u0442\u0435\u043d\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u0436\u0430\u0442\u0438\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 libzstd \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e SQL-\u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043f\u043e [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-114563","post","type-post","status-publish","format-standard","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041f\u0440\u043e\u0435\u043a\u0442 Pack \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u043d\u044f\u043b \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0434\u043b\u044f \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u0431\u0430\u0437\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 SQLite \u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0441\u0436\u0430\u0442\u0438\u044f ZSTD (Zstandard).\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/ro\/blog\/news\/eksperiment-s-ispolzovaniem-sqlite-v-kachestve-kontejnera-dlya-arhivirovaniya-fajlov\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"ro_RO\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c SQLite \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0434\u043b\u044f \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041f\u0440\u043e\u0435\u043a\u0442 Pack \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u043d\u044f\u043b \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0434\u043b\u044f \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u0431\u0430\u0437\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 SQLite \u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0441\u0436\u0430\u0442\u0438\u044f ZSTD (Zstandard).\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/ro\/blog\/news\/eksperiment-s-ispolzovaniem-sqlite-v-kachestve-kontejnera-dlya-arhivirovaniya-fajlov\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2024-03-25T16:26:02+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2024-03-25T16:26:02+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Experiment cu utilizarea SQLite ca container pentru arhivarea fi\u0219ierelor | ProHoster","description":"Proiectul Pack a \u00eencercat s\u0103 creeze un format pentru arhivarea fi\u0219ierelor, bazat pe biblioteca SQLite \u0219i algoritmul de compresie ZSTD (Zstandard).","canonical_url":"https:\/\/prohoster.info\/ro\/blog\/news\/eksperiment-s-ispolzovaniem-sqlite-v-kachestve-kontejnera-dlya-arhivirovaniya-fajlov","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"ro_RO","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c SQLite \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0434\u043b\u044f \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 | ProHoster","og:description":"\u041f\u0440\u043e\u0435\u043a\u0442 Pack \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u043d\u044f\u043b \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0434\u043b\u044f \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u0431\u0430\u0437\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 SQLite \u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0441\u0436\u0430\u0442\u0438\u044f ZSTD (Zstandard).","og:url":"https:\/\/prohoster.info\/ro\/blog\/news\/eksperiment-s-ispolzovaniem-sqlite-v-kachestve-kontejnera-dlya-arhivirovaniya-fajlov","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2024-03-25T16:26:02+00:00","article:modified_time":"2024-03-25T16:26:02+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":[],"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/posts\/114563","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/comments?post=114563"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/posts\/114563\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/media?parent=114563"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/categories?post=114563"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/tags?post=114563"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}