{"id":394136,"date":"2024-06-29T11:25:27","date_gmt":"2024-06-29T11:25:27","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=394136"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=394136","title":{"rendered":"<span>\u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u2014 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c. \u041d\u043e\u0432\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 QOI \u0432 20\u221250 \u0440\u0430\u0437 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 PNG<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/fk\/io\/xu\/fkioxuovxtqnuhg8fsl0x--meky.png\" data-src=\"https:\/\/habrastorage.org\/webt\/fk\/io\/xu\/fkioxuovxtqnuhg8fsl0x--meky.png\"\/><\/p>\n<p>  \u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u2014 \u044d\u0442\u043e \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u043c\u0430\u0433\u0438\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0431\u0435\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043b\u0435\u0442 \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0432 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b. \u0414\u0430\u0436\u0435 \u043e\u043f\u0435\u043d\u0441\u043e\u0440\u0441\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0441\u043f\u0430\u0433\u0435\u0442\u0442\u0438 \u043d\u0430\u0432\u043e\u0440\u043e\u0447\u0435\u043d\u043d\u044b\u0445 \u0438 \u0445\u0438\u0442\u0440\u043e\u0443\u043c\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0442\u0438\u043f\u0430 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Huffman_coding\">\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0425\u0430\u0444\u0444\u043c\u0430\u043d\u0430<\/a> \u0438 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Discrete_cosine_transform\">\u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e-\u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/a> \u2014 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0434\u0435\u0441\u044f\u0442\u0438\u043b\u0435\u0442\u0438\u0439 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0439 \u043d\u0430\u0443\u043a\u0438.<\/p>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u043e\u043b\u044c\u0441\u043a\u0438\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0414\u043e\u043c\u0438\u043d\u0438\u043a \u0428\u0430\u0431\u043b\u0435\u0432\u0441\u043a\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0442\u043e \u043e\u043d \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0441\u0436\u0430\u0442\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0431\u0435\u0437 \u043f\u043e\u0442\u0435\u0440\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0432\u0441\u0435\u0433\u043e \u0432 <a href=\"https:\/\/github.com\/phoboslab\/qoi\">300 \u0441\u0442\u0440\u043e\u0447\u0435\u043a \u043a\u043e\u0434\u0430<\/a>, \u043d\u0430 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0435. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0435\u0433\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u0438\u0432\u0438\u043b.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u041e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 \u043f\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043d\u0430 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u043a\u043e\u0434\u0435\u043a\u0438 libpng \u0438 stbi.<\/p>\n<p>  \u0414\u043e\u043c\u0438\u043d\u0438\u043a \u0428\u0430\u0431\u043b\u0435\u0432\u0441\u043a\u0438 \u043d\u0430\u0437\u0432\u0430\u043b \u0444\u043e\u0440\u043c\u0430\u0442 Quite OK (Quite OK Image), \u0442\u043e \u0435\u0441\u0442\u044c \u00ab\u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0435\u00bb \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0438 \u0440\u0430\u0437\u043c\u0435\u0440. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043e\u043d \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u0437\u0430\u0442\u043e\u0447\u0435\u043d \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c. \u0412\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u2014 \u043f\u0440\u0438 \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0444\u0430\u0439\u043b\u043e\u0432, \u0432 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430\u0445 \u2014 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u043c.<\/p>\n<p>  \u0410\u0432\u0442\u043e\u0440 \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u0441\u0432\u043e\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u043e \u0433\u043b\u0443\u043f\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u043c. \u041e\u043d \u0431\u0435\u0440\u0451\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f RGB \u0438 RGBA \u2014 \u0438 \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442 \u0438\u0445 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 QOI \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0441 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 PNG, \u043d\u043e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435. \u0412\u0441\u0451 \u0432 \u043e\u0434\u0438\u043d \u043f\u043e\u0442\u043e\u043a, \u0431\u0435\u0437 SIMD.<\/p>\n<p>  \u0412 \u0441\u0432\u043e\u0451\u043c \u0431\u043b\u043e\u0433\u0435 \u0414\u043e\u043c\u0438\u043d\u0438\u043a <a href=\"https:\/\/phoboslab.org\/log\/2021\/11\/qoi-fast-lossless-image-compression\">\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442<\/a> \u043d\u0435\u0445\u0438\u0442\u0440\u0443\u044e \u0442\u0435\u0445\u043d\u0438\u043a\u0443 \u0441\u0436\u0430\u0442\u0438\u044f. \u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u0445\u043e\u0434, \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0438\u043a\u0441\u0435\u043b\u044c \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0438 \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443:<\/p>\n<ol>\n<li>\u0415\u0441\u043b\u0438 \u043f\u0438\u043a\u0441\u0435\u043b\u044c \u0440\u0430\u0432\u0435\u043d \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c\u0443, \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0447\u0451\u0442\u0447\u0438\u043a \u043f\u043e \u0442\u0438\u043f\u0443 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Run-length_encoding\">\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043e\u0432<\/a> (RLE). \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 2, \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435  <\/li>\n<li>\u041f\u0438\u043a\u0441\u0435\u043b\u044c \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 64 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u043f\u043e \u00ab\u0445\u0435\u0448\u0443\u00bb <code>r^g^b^a<\/code>  <\/li>\n<li>\u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u043c, \u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f  <\/li>\n<li>\u041f\u043e\u043b\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 RGBA<\/li>\n<\/ol>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0433\u0440\u0443\u043f\u043f\u044b \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0442\u0435\u0433\u0430 (\u043c\u0435\u0442\u043e\u0434 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f), \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0438\u0434\u0443\u0442 \u0431\u0438\u0442\u044b. \u0412\u0441\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u0432\u044b\u0440\u043e\u0432\u043d\u0435\u043d\u044b \u043f\u043e \u0431\u0430\u0439\u0442\u0430\u043c \u0434\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<p>  \u0412\u043e\u0442 \u0438 \u0432\u0441\u0451.<\/p>\n<p>  \u0414\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f, \u043d\u0438\u0436\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441\u0436\u0430\u0442\u0438\u044f \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u043e\u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0430\u0439\u0442\u043e\u0432. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 libpng, stbi \u0438 qoi. \u0423\u043a\u0430\u0437\u0430\u043d \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0430, \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0432\u0440\u0435\u043c\u044f \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f\/\u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043c\u0435\u0433\u0430\u043f\u0438\u043a\u0441\u0435\u043b\u044f\u0445 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432. \u0422\u0435\u0441\u0442\u044b \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b\u0438\u0441\u044c \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0435 Intel i7-6700K.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0411\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0438<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre>\/screenshots\/news.ycombinator.com.png: 1325x1450 decode ms encode ms decode mpps encode mpps size kb libpng: 8.6 79.9 223.22 24.03 289 stbi: 6.0 157.4 319.14 12.21 333 qoi: 3.0 3.8 649.95 502.49 288  \/screenshots\/reddit.com.png: 1313x8008 decode ms encode ms decode mpps encode mpps size kb libpng: 72.4 754.0 145.23 13.95 2821 stbi: 43.3 990.1 243.06 10.62 3927 qoi: 25.2 31.8 417.56 330.15 3083  \/screenshots\/nytimes.com.png&lt;\/a>: 1313x5780 decode ms encode ms decode mpps encode mpps size kb libpng: 53.2 575.6 142.75 13.18 2672 stbi: 36.5 700.7 207.79 10.83 3377 qoi: 17.4 23.1 436.58 327.94 2820  \/screenshots\/phoboslab.org.png&lt;\/a>: 1313x20667 decode ms encode ms decode mpps encode mpps size kb libpng: 116.4 1452.2 233.03 18.69 6199 stbi: 80.8 1861.0 335.93 14.58 7421 qoi: 57.7 79.2 470.43 342.82 8337  \/screenshots\/microsoft.com.png&lt;\/a>: 1313x3328 decode ms encode ms decode mpps encode mpps size kb libpng: 28.7 356.7 152.36 12.25 1518 stbi: 20.8 413.0 210.03 10.58 2030 qoi: 10.2 14.3 429.00 306.57 1701  \/screenshots\/cnn.com.png&lt;\/a>: 1313x5241 decode ms encode ms decode mpps encode mpps size kb libpng: 36.2 457.2 189.96 15.05 2246 stbi: 30.7 613.9 224.44 11.21 2729 qoi: 14.4 20.2 478.56 340.84 2449  \/screenshots\/sublime.png&lt;\/a>: 1008x9513 decode ms encode ms decode mpps encode mpps size kb libpng: 38.4 405.6 249.44 23.64 1579 stbi: 29.5 761.8 325.20 12.59 1858 qoi: 16.9 20.5 568.14 468.58 1538  \/screenshots\/amazon.com.png&lt;\/a>: 1313x6097 decode ms encode ms decode mpps encode mpps size kb libpng: 67.3 843.0 118.97 9.50 4589 stbi: 58.1 841.4 137.84 9.51 6014 qoi: 24.7 36.3 323.62 220.51 5382  \/screenshots\/imdb.com.png&lt;\/a>: 1313x6441 decode ms encode ms decode mpps encode mpps size kb libpng: 43.3 535.0 195.43 15.81 2264 stbi: 37.3 761.0 226.62 11.11 3053 qoi: 17.9 23.0 472.10 367.12 2541  \/screenshots\/duckduckgo.com.png&lt;\/a>: 1313x2874 decode ms encode ms decode mpps encode mpps size kb libpng: 12.7 146.3 297.73 25.80 333 stbi: 8.8 300.3 427.03 12.57 436 qoi: 5.0 6.8 755.00 558.83 330  \/screenshots\/en.wikipedia.org.png&lt;\/a>: 1313x2936 decode ms encode ms decode mpps encode mpps size kb libpng: 21.7 227.7 177.59 16.93 1342 stbi: 15.2 317.3 253.86 12.15 1497 qoi: 8.4 11.9 460.19 325.07 1547  \/screenshots\/apple.com.png&lt;\/a>: 1313x4755 decode ms encode ms decode mpps encode mpps size kb libpng: 33.1 427.8 188.47 14.59 1941 stbi: 27.5 556.7 227.34 11.21 2575 qoi: 13.2 18.6 474.51 335.93 2157  \/screenshots\/stripe.com.png&lt;\/a>: 1313x6603 decode ms encode ms decode mpps encode mpps size kb libpng: 40.8 411.5 212.45 21.07 1054 stbi: 24.4 691.6 354.68 12.54 1428 qoi: 16.2 19.4 535.20 447.23 1386<\/pre>\n<\/div><\/div>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0440\u0430\u0437\u043c\u0435\u0440 \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 QOI \u043e\u0431\u044b\u0447\u043d\u043e \u043c\u0435\u0436\u0434\u0443 libpng \u0438 stbi, \u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0432\u044b\u0448\u0435. \u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u0432 \u0441\u0436\u0430\u0442\u0438\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 20\u221250 \u0440\u0430\u0437, \u0432 \u0434\u0435\u043a\u043e\u043c\u043f\u0440\u0435\u0441\u0441\u0438\u0438 \u2014 3\u22124 \u0440\u0430\u0437\u0430.<\/p>\n<p>  \u0412 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u043f\u043e \u0432\u0441\u0435\u043c \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0430\u043c:<\/p>\n<pre> decode ms encode ms decode mpps encode mpps size kb libpng: 44.1 513.3 186.80 16.04 2219 stbi: 32.2 689.7 255.47 11.93 2821 qoi: 17.7 23.8 465.18 346.52 2582<\/pre>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u043e\u0432 \u0441\u043c. <a href=\"https:\/\/phoboslab.org\/files\/qoibench\/\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u041d\u0430\u0431\u043e\u0440 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438: <a href=\"https:\/\/phoboslab.org\/files\/qoibench\/images.tar\">images.tar<\/a>, ~308 \u041c\u0411.<\/p>\n<p>  \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, QOI \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0438\u043a\u0430\u043a\u0438\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b, \u0434\u0430 \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0438\u043a\u0442\u043e \u0435\u0433\u043e \u0435\u0449\u0451 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442. \u041d\u043e \u043e\u043d \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u0431\u0435\u0437 \u043f\u043e\u0442\u0435\u0440\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430, \u0435\u0441\u043b\u0438 \u0433\u043b\u0430\u0432\u043d\u044b\u043c \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c.<\/p>\n<p>  \u0414\u043e\u043c\u0438\u043d\u0438\u043a \u0428\u0430\u0431\u043b\u0435\u0432\u0441\u043a\u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u0442, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432 \u0441\u0436\u0430\u0442\u0438\u044f \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0434\u0443\u043c\u0430\u044e\u0442 \u043e\u0431 \u0443\u0440\u043e\u0432\u043d\u0435 \u0441\u0436\u0430\u0442\u0438\u044f, \u0440\u0430\u0437\u043c\u0435\u0440\u0435 \u0444\u0430\u0439\u043b\u043e\u0432. \u041c\u0430\u043b\u043e \u043a\u0442\u043e \u0441\u0442\u0430\u0432\u0438\u0442 \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443 \u043a\u043e\u0434\u0435\u043a\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435 \u0435\u0441\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c \u0432 \u0441\u0443\u043f\u0435\u0440\u043f\u0440\u043e\u0441\u0442\u043e\u043c \u0438 \u0431\u044b\u0441\u0442\u0440\u043e\u043c \u043a\u043e\u0434\u0435\u043a\u0435. \u041c\u043e\u0436\u0435\u0442, \u043e\u043d \u043a\u043e\u043c\u0443-\u0442\u043e \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f.<\/p>\n<p>  \u0422\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043a\u043e\u0434\u0435\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u043f\u043e\u0441\u043e\u0431\u0438\u0442\u044c \u0434\u043b\u044f \u0441\u0443\u043f\u0435\u0440\u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0441\u0436\u0430\u0442\u0438\u044f \u0432\u0438\u0434\u0435\u043e (\u0431\u0435\u0437 \u043f\u043e\u0442\u0435\u0440\u044c) \u043d\u0430 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u0430\u0445.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041a\u043e\u0434 qoi.h<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">\/\/ Header - Public functions  #ifndef QOI_H #define QOI_H  #ifdef __cplusplus extern \"C\" { #endif  \/\/ A pointer to qoi_desc struct has to be supplied to all of qoi's functions. It \/\/ describes either the input format (for qoi_write, qoi_encode), or is filled \/\/ with the description read from the file header (for qoi_read, qoi_decode).  \/\/ The colorspace in this qoi_desc is a bitmap with 0000rgba where a 0-bit \/\/ indicates sRGB and a 1-bit indicates linear colorspace for each channel. You \/\/ may use one of the predefined constants: QOI_SRGB, QOI_SRGB_LINEAR_ALPHA or \/\/ QOI_LINEAR. The colorspace is purely informative. It will be saved to the \/\/ file header, but does not affect en-\/decoding in any way.  #define QOI_SRGB 0x00 #define QOI_SRGB_LINEAR_ALPHA 0x01 #define QOI_LINEAR 0x0f  typedef struct { unsigned int width; unsigned int height; unsigned char channels; unsigned char colorspace; } qoi_desc;  #ifndef QOI_NO_STDIO  \/\/ Encode raw RGB or RGBA pixels into a QOI image and write it to the file \/\/ system. The qoi_desc struct must be filled with the image width, height, \/\/ number of channels (3 = RGB, 4 = RGBA) and the colorspace.  \/\/ The function returns 0 on failure (invalid parameters, or fopen or malloc \/\/ failed) or the number of bytes written on success.  int qoi_write(const char *filename, const void *data, const qoi_desc *desc);   \/\/ Read and decode a QOI image from the file system. If channels is 0, the \/\/ number of channels from the file header is used. If channels is 3 or 4 the \/\/ output format will be forced into this number of channels.  \/\/ The function either returns NULL on failure (invalid data, or malloc or fopen \/\/ failed) or a pointer to the decoded pixels. On success, the qoi_desc struct \/\/ will be filled with the description from the file header.  \/\/ The returned pixel data should be free()d after use.  void *qoi_read(const char *filename, qoi_desc *desc, int channels);  #endif \/\/ QOI_NO_STDIO   \/\/ Encode raw RGB or RGBA pixels into a QOI image in memory.  \/\/ The function either returns NULL on failure (invalid parameters or malloc \/\/ failed) or a pointer to the encoded data on success. On success the out_len \/\/ is set to the size in bytes of the encoded data.  \/\/ The returned qoi data should be free()d after use.  void *qoi_encode(const void *data, const qoi_desc *desc, int *out_len);   \/\/ Decode a QOI image from memory.  \/\/ The function either returns NULL on failure (invalid parameters or malloc \/\/ failed) or a pointer to the decoded pixels. On success, the qoi_desc struct \/\/ is filled with the description from the file header.  \/\/ The returned pixel data should be free()d after use.  void *qoi_decode(const void *data, int size, qoi_desc *desc, int channels);   #ifdef __cplusplus } #endif #endif \/\/ QOI_H   \/\/ ----------------------------------------------------------------------------- \/\/ Implementation  #ifdef QOI_IMPLEMENTATION #include &lt;stdlib.h>  #ifndef QOI_MALLOC #define QOI_MALLOC(sz) malloc(sz) #define QOI_FREE(p) free(p) #endif  #define QOI_INDEX 0x00 \/\/ 00xxxxxx #define QOI_RUN_8 0x40 \/\/ 010xxxxx #define QOI_RUN_16 0x60 \/\/ 011xxxxx #define QOI_DIFF_8 0x80 \/\/ 10xxxxxx #define QOI_DIFF_16 0xc0 \/\/ 110xxxxx #define QOI_DIFF_24 0xe0 \/\/ 1110xxxx #define QOI_COLOR 0xf0 \/\/ 1111xxxx  #define QOI_MASK_2 0xc0 \/\/ 11000000 #define QOI_MASK_3 0xe0 \/\/ 11100000 #define QOI_MASK_4 0xf0 \/\/ 11110000  #define QOI_COLOR_HASH(C) (C.rgba.r ^ C.rgba.g ^ C.rgba.b ^ C.rgba.a) #define QOI_MAGIC \\ (((unsigned int)'q') &lt;&lt; 24 | ((unsigned int)'o') &lt;&lt; 16 | \\  ((unsigned int)'i') &lt;&lt; 8 | ((unsigned int)'f')) #define QOI_HEADER_SIZE 14 #define QOI_PADDING 4  typedef union { struct { unsigned char r, g, b, a; } rgba; unsigned int v; } qoi_rgba_t;  void qoi_write_32(unsigned char *bytes, int *p, unsigned int v) { bytes[(*p)++] = (0xff000000 &amp; v) >> 24; bytes[(*p)++] = (0x00ff0000 &amp; v) >> 16; bytes[(*p)++] = (0x0000ff00 &amp; v) >> 8; bytes[(*p)++] = (0x000000ff &amp; v); }  unsigned int qoi_read_32(const unsigned char *bytes, int *p) { unsigned int a = bytes[(*p)++]; unsigned int b = bytes[(*p)++]; unsigned int c = bytes[(*p)++]; unsigned int d = bytes[(*p)++]; return (a &lt;&lt; 24) | (b &lt;&lt; 16) | (c &lt;&lt; 8) | d; }  void *qoi_encode(const void *data, const qoi_desc *desc, int *out_len) { if ( data == NULL || out_len == NULL || desc == NULL || desc->width == 0 || desc->height == 0 || desc->channels &lt; 3 || desc->channels > 4 || (desc->colorspace &amp; 0xf0) != 0 ) { return NULL; }  int max_size = desc->width * desc->height * (desc->channels + 1) + QOI_HEADER_SIZE + QOI_PADDING;  int p = 0; unsigned char *bytes = QOI_MALLOC(max_size); if (!bytes) { return NULL; }  qoi_write_32(bytes, &amp;p, QOI_MAGIC); qoi_write_32(bytes, &amp;p, desc->width); qoi_write_32(bytes, &amp;p, desc->height); bytes[p++] = desc->channels; bytes[p++] = desc->colorspace;   const unsigned char *pixels = (const unsigned char *)data;  qoi_rgba_t index[64] = {0};  int run = 0; qoi_rgba_t px_prev = {.rgba = {.r = 0, .g = 0, .b = 0, .a = 255}}; qoi_rgba_t px = px_prev;  int px_len = desc->width * desc->height * desc->channels; int px_end = px_len - desc->channels; int channels = desc->channels;  for (int px_pos = 0; px_pos &lt; px_len; px_pos += channels) { if (channels == 4) { px = *(qoi_rgba_t *)(pixels + px_pos); } else { px.rgba.r = pixels[px_pos]; px.rgba.g = pixels[px_pos+1]; px.rgba.b = pixels[px_pos+2]; }  if (px.v == px_prev.v) { run++; }  if ( run > 0 &amp;&amp; (run == 0x2020 || px.v != px_prev.v || px_pos == px_end) ) { if (run &lt; 33) { run -= 1; bytes[p++] = QOI_RUN_8 | run; } else { run -= 33; bytes[p++] = QOI_RUN_16 | run >> 8; bytes[p++] = run; } run = 0; }  if (px.v != px_prev.v) { int index_pos = QOI_COLOR_HASH(px) % 64;  if (index[index_pos].v == px.v) { bytes[p++] = QOI_INDEX | index_pos; } else { index[index_pos] = px;  int vr = px.rgba.r - px_prev.rgba.r; int vg = px.rgba.g - px_prev.rgba.g; int vb = px.rgba.b - px_prev.rgba.b; int va = px.rgba.a - px_prev.rgba.a;  if ( vr > -17 &amp;&amp; vr &lt; 16 &amp;&amp; vg > -17 &amp;&amp; vg &lt; 16 &amp;&amp; vb > -17 &amp;&amp; vb &lt; 16 &amp;&amp; va > -17 &amp;&amp; va &lt; 16 ) { if ( va == 0 &amp;&amp; vr > -3 &amp;&amp; vr &lt; 2 &amp;&amp; vg > -3 &amp;&amp; vg &lt; 2 &amp;&amp; vb > -3 &amp;&amp; vb &lt; 2 ) { bytes[p++] = QOI_DIFF_8 | ((vr + 2) &lt;&lt; 4) | (vg + 2) &lt;&lt; 2 | (vb + 2); } else if ( va == 0 &amp;&amp; vr > -17 &amp;&amp; vr &lt; 16 &amp;&amp; vg > -9 &amp;&amp; vg &lt; 8 &amp;&amp; vb > -9 &amp;&amp; vb &lt; 8 ) { bytes[p++] = QOI_DIFF_16 | (vr + 16); bytes[p++] = (vg + 8) &lt;&lt; 4 | (vb + 8); } else { bytes[p++] = QOI_DIFF_24 | (vr + 16) >> 1; bytes[p++] = (vr + 16) &lt;&lt; 7 | (vg + 16) &lt;&lt; 2 | (vb + 16) >> 3; bytes[p++] = (vb + 16) &lt;&lt; 5 | (va + 16); } } else { bytes[p++] = QOI_COLOR | (vr ? 8 : 0) | (vg ? 4 : 0) | (vb ? 2 : 0) | (va ? 1 : 0); if (vr) { bytes[p++] = px.rgba.r; } if (vg) { bytes[p++] = px.rgba.g; } if (vb) { bytes[p++] = px.rgba.b; } if (va) { bytes[p++] = px.rgba.a; } } } } px_prev = px; }  for (int i = 0; i &lt; QOI_PADDING; i++) { bytes[p++] = 0; }  *out_len = p; return bytes; }  void *qoi_decode(const void *data, int size, qoi_desc *desc, int channels) { if ( data == NULL || desc == NULL || (channels != 0 &amp;&amp; channels != 3 &amp;&amp; channels != 4) || size &lt; QOI_HEADER_SIZE + QOI_PADDING ) { return NULL; }  const unsigned char *bytes = (const unsigned char *)data; int p = 0;  unsigned int header_magic = qoi_read_32(bytes, &amp;p); desc->width = qoi_read_32(bytes, &amp;p); desc->height = qoi_read_32(bytes, &amp;p); desc->channels = bytes[p++]; desc->colorspace = bytes[p++];  if ( desc->width == 0 || desc->height == 0 || desc->channels &lt; 3 || desc->channels > 4 || header_magic != QOI_MAGIC ) { return NULL; }  if (channels == 0) { channels = desc->channels; }  int px_len = desc->width * desc->height * channels; unsigned char *pixels = QOI_MALLOC(px_len); if (!pixels) { return NULL; }  qoi_rgba_t px = {.rgba = {.r = 0, .g = 0, .b = 0, .a = 255}}; qoi_rgba_t index[64] = {0};  int run = 0; int chunks_len = size - QOI_PADDING; for (int px_pos = 0; px_pos &lt; px_len; px_pos += channels) { if (run > 0) { run--; } else if (p &lt; chunks_len) { int b1 = bytes[p++];  if ((b1 &amp; QOI_MASK_2) == QOI_INDEX) { px = index[b1 ^ QOI_INDEX]; } else if ((b1 &amp; QOI_MASK_3) == QOI_RUN_8) { run = (b1 &amp; 0x1f); } else if ((b1 &amp; QOI_MASK_3) == QOI_RUN_16) { int b2 = bytes[p++]; run = (((b1 &amp; 0x1f) &lt;&lt; 8) | (b2)) + 32; } else if ((b1 &amp; QOI_MASK_2) == QOI_DIFF_8) { px.rgba.r += ((b1 >> 4) &amp; 0x03) - 2; px.rgba.g += ((b1 >> 2) &amp; 0x03) - 2; px.rgba.b += ( b1 &amp; 0x03) - 2; } else if ((b1 &amp; QOI_MASK_3) == QOI_DIFF_16) { int b2 = bytes[p++]; px.rgba.r += (b1 &amp; 0x1f) - 16; px.rgba.g += (b2 >> 4) - 8; px.rgba.b += (b2 &amp; 0x0f) - 8; } else if ((b1 &amp; QOI_MASK_4) == QOI_DIFF_24) { int b2 = bytes[p++]; int b3 = bytes[p++]; px.rgba.r += (((b1 &amp; 0x0f) &lt;&lt; 1) | (b2 >> 7)) - 16; px.rgba.g += ((b2 &amp; 0x7c) >> 2) - 16; px.rgba.b += (((b2 &amp; 0x03) &lt;&lt; 3) | ((b3 &amp; 0xe0) >> 5)) - 16; px.rgba.a += (b3 &amp; 0x1f) - 16; } else if ((b1 &amp; QOI_MASK_4) == QOI_COLOR) { if (b1 &amp; 8) { px.rgba.r = bytes[p++]; } if (b1 &amp; 4) { px.rgba.g = bytes[p++]; } if (b1 &amp; 2) { px.rgba.b = bytes[p++]; } if (b1 &amp; 1) { px.rgba.a = bytes[p++]; } }  index[QOI_COLOR_HASH(px) % 64] = px; }  if (channels == 4) { *(qoi_rgba_t*)(pixels + px_pos) = px; } else { pixels[px_pos] = px.rgba.r; pixels[px_pos+1] = px.rgba.g; pixels[px_pos+2] = px.rgba.b; } }  return pixels; }  #ifndef QOI_NO_STDIO #include &lt;stdio.h>  int qoi_write(const char *filename, const void *data, const qoi_desc *desc) { FILE *f = fopen(filename, \"wb\"); if (!f) { return 0; }  int size; void *encoded = qoi_encode(data, desc, &amp;size); if (!encoded) { fclose(f); return 0; }  fwrite(encoded, 1, size, f); fclose(f);  QOI_FREE(encoded); return size; }  void *qoi_read(const char *filename, qoi_desc *desc, int channels) { FILE *f = fopen(filename, \"rb\"); if (!f) { return NULL; }  fseek(f, 0, SEEK_END); int size = ftell(f); fseek(f, 0, SEEK_SET);  void *data = QOI_MALLOC(size); if (!data) { fclose(f); return NULL; }  int bytes_read = fread(data, 1, size, f); fclose(f);  void *pixels = qoi_decode(data, bytes_read, desc, channels); QOI_FREE(data); return pixels; }  #endif \/\/ QOI_NO_STDIO #endif \/\/ QOI_IMPLEMENTATION<\/code><\/pre>\n<\/div><\/div>\n<p>  <b>P. S. <\/b>\u0412 \u043f\u0435\u0440\u0432\u044b\u0439 \u0434\u0435\u043d\u044c \u043f\u043e\u0441\u043b\u0435 \u0430\u043d\u043e\u043d\u0441\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u0438\u0441\u044c <a href=\"https:\/\/github.com\/phoboslab\/qoi\/issues\/48\">\u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0431\u0430\u0433\u0438<\/a>. \u0410\u0432\u0442\u043e\u0440 \u043e\u0431\u0435\u0449\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e 20 \u0434\u0435\u043a\u0430\u0431\u0440\u044f 2021 \u0433\u043e\u0434\u0430.<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/592699\/\"> https:\/\/habr.com\/ru\/articles\/592699\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/fk\/io\/xu\/fkioxuovxtqnuhg8fsl0x--meky.png\" data-src=\"https:\/\/habrastorage.org\/webt\/fk\/io\/xu\/fkioxuovxtqnuhg8fsl0x--meky.png\"\/><\/p>\n<p>  \u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u2014 \u044d\u0442\u043e \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u043c\u0430\u0433\u0438\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0431\u0435\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043b\u0435\u0442 \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0432 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b. \u0414\u0430\u0436\u0435 \u043e\u043f\u0435\u043d\u0441\u043e\u0440\u0441\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0441\u043f\u0430\u0433\u0435\u0442\u0442\u0438 \u043d\u0430\u0432\u043e\u0440\u043e\u0447\u0435\u043d\u043d\u044b\u0445 \u0438 \u0445\u0438\u0442\u0440\u043e\u0443\u043c\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0442\u0438\u043f\u0430 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Huffman_coding\">\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0425\u0430\u0444\u0444\u043c\u0430\u043d\u0430<\/a> \u0438 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Discrete_cosine_transform\">\u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e-\u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/a> \u2014 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0434\u0435\u0441\u044f\u0442\u0438\u043b\u0435\u0442\u0438\u0439 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0439 \u043d\u0430\u0443\u043a\u0438.<\/p>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u043e\u043b\u044c\u0441\u043a\u0438\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0414\u043e\u043c\u0438\u043d\u0438\u043a \u0428\u0430\u0431\u043b\u0435\u0432\u0441\u043a\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0442\u043e \u043e\u043d \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0441\u0436\u0430\u0442\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0431\u0435\u0437 \u043f\u043e\u0442\u0435\u0440\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0432\u0441\u0435\u0433\u043e \u0432 <a href=\"https:\/\/github.com\/phoboslab\/qoi\">300 \u0441\u0442\u0440\u043e\u0447\u0435\u043a \u043a\u043e\u0434\u0430<\/a>, \u043d\u0430 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0435. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0435\u0433\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u0438\u0432\u0438\u043b.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-394136","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/394136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=394136"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/394136\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=394136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=394136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=394136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}