{"id":299206,"date":"2020-02-25T09:00:24","date_gmt":"2020-02-25T09:00:24","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=299206"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=299206","title":{"rendered":"\u0411\u043e\u043b\u044c\u0448\u0438\u0435 \u0430\u043f\u043f\u0435\u0442\u0438\u0442\u044b \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 Buffer \u0432 Node.js"},"content":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/tensor\/blog\/488678\/\">\u042f \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043f\u0440\u043e <a href=\"https:\/\/habr.com\/post\/487380\/\">\u0441\u0435\u0440\u0432\u0438\u0441 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a PostgreSQL<\/a>, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u043e\u043d\u043b\u0430\u0439\u043d-\u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0445 \u043b\u043e\u0433\u043e\u0432, \u0447\u044c\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u2014 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043a\u0438 \u043b\u043e\u0433\u043e\u0432 \u0441\u0440\u0430\u0437\u0443 \u0441 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0445\u043e\u0441\u0442\u043e\u0432, \u0431\u044b\u0441\u0442\u0440\u043e \u0438\u0445 <b>\u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0438<\/b>, \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043f\u0430\u043a\u0435\u0442\u044b \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438 <b>\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432 PostgreSQL<\/b>-\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/vk\/dn\/xj\/vkdnxj5l8luuvnk31xevce4auae.png\"><\/p>\n<p>  \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e <a href=\"https:\/\/sbis.ru\/all_services\">\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u043e\u0442\u043d\u044f\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432<\/a> \u0438 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u043f\u043b\u0430\u043d\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 <b>\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 100GB \u043b\u043e\u0433\u043e\u0432 \u0432 \u0434\u0435\u043d\u044c<\/b>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u044b\u043b\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u0438, \u0447\u0442\u043e \u043b\u044c\u0432\u0438\u043d\u0430\u044f \u0434\u043e\u043b\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0442\u0440\u0430\u0442\u0438\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u0434\u0432\u0435 \u044d\u0442\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438: \u0440\u0430\u0437\u0431\u043e\u0440 \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0431\u0430\u0437\u0443.<\/p>\n<p>  \u041c\u044b \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u043b\u0438\u0441\u044c \u0432 \u043d\u0435\u0434\u0440\u0430 \u043f\u0440\u043e\u0444\u0430\u0439\u043b\u0435\u0440\u0430 \u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 <a href=\"https:\/\/nodejs.org\/dist\/latest-v12.x\/docs\/api\/buffer.html\"><code>Buffer<\/code><\/a> \u0432 Node.js, \u0437\u043d\u0430\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u0441\u0438\u043b\u044c\u043d\u043e \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u0432\u0430\u0448\u0435 \u0432\u0440\u0435\u043c\u044f \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043d\u0430\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430<\/h2>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/od\/uv\/lm\/oduvlmuc8wmu5obyljyygjnc8vw.png\"><\/p>\n<p>  \u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0442\u0440\u0430\u0442\u0438\u043b\u0430\u0441\u044c \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u043b\u043e\u0433-\u043f\u043e\u0442\u043e\u043a\u0430, \u0447\u0442\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e. \u041d\u043e \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e \u2014 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0435\u043c\u043a\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u043e\u0439 <b>\u00ab\u043d\u0430\u0440\u0435\u0437\u043a\u0438\u00bb \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0438<\/b> \u043f\u043e <code>\\r\\n<\/code>:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/dk\/v4\/tb\/dkv4tbigt2rwylskt8x_iqzcurc.png\"><\/p>\n<p>  \u0412\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u0440\u0430\u0437\u0443 \u0437\u0430\u043c\u0435\u0442\u0438\u0442 \u0442\u0443\u0442 \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 <b>\u043f\u043e\u0431\u0430\u0439\u0442\u043e\u0432\u044b\u0439 \u0446\u0438\u043a\u043b<\/b> \u043f\u043e \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u043c\u0443 \u0431\u0443\u0444\u0435\u0440\u0443. \u041d\u0443 \u0430 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441\u0442\u0440\u043e\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u00ab\u0440\u0430\u0437\u043e\u0440\u0432\u0430\u043d\u0430\u00bb \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u043c\u0438 \u0431\u043b\u043e\u043a\u0430\u043c\u0438, \u0442\u043e \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0438 <b>\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u00ab\u043f\u0440\u0438\u0446\u0435\u043f\u043b\u0435\u043d\u0438\u044f \u0445\u0432\u043e\u0441\u0442\u0430\u00bb<\/b>, \u043e\u0441\u0442\u0430\u0432\u0448\u0435\u0433\u043e\u0441\u044f \u043e\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430.<\/p>\n<h4>\u041f\u0440\u043e\u0431\u0443\u0435\u043c readline<\/h4>\n<p>  \u0411\u0435\u0433\u043b\u044b\u0439 \u043e\u0431\u0437\u043e\u0440 \u0438\u043c\u0435\u044e\u0449\u0438\u0445\u0441\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0432\u044b\u0432\u0435\u043b \u043d\u0430\u0441 \u043d\u0430 \u0448\u0442\u0430\u0442\u043d\u044b\u0439 <a href=\"https:\/\/nodejs.org\/dist\/latest-v12.x\/docs\/api\/readline.html\">\u043c\u043e\u0434\u0443\u043b\u044c readline<\/a> \u0440\u043e\u0432\u043d\u043e \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c \u043d\u0430\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c \u043d\u0430\u0440\u0435\u0437\u043a\u0438 \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0438:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/he\/px\/0v\/hepx0v5do7wgj9osz0cwyhuljvg.png\"><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0435\u0433\u043e \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u00ab\u043d\u0430\u0440\u0435\u0437\u043a\u0430\u00bb \u0438\u0437 \u0442\u043e\u043f\u0430 \u043f\u0440\u043e\u0444\u0430\u0439\u043b\u0435\u0440\u0430 \u0443\u0448\u043b\u0430 \u0432 \u0433\u043b\u0443\u0431\u0438\u043d\u0443:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/jc\/5x\/et\/jc5xetsqi24hpgggyg0yss6ggww.png\"><\/p>\n<p>  \u041d\u043e, \u043a\u0430\u043a \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0435\u0431\u044f <b>readline \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 UTF-8<\/b>, \u0447\u0435\u0433\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0443 \u0437\u0430\u043f\u0438\u0441\u0438 \u043b\u043e\u0433\u0430 (\u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043f\u043b\u0430\u043d\u0430, \u0442\u0435\u043a\u0441\u0442\u0430 \u043e\u0448\u0438\u0431\u043a\u0438) \u0434\u0440\u0443\u0433\u0430\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u0430\u044f \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430.<\/p>\n<p>  \u0412\u0435\u0434\u044c \u0434\u0430\u0436\u0435 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c PostgreSQL-\u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u0430\u0437, \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u0432\u044b\u0432\u043e\u0434 \u0432 \u043e\u0431\u0449\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 \u043b\u043e\u0433 \u0438\u043c\u0435\u043d\u043d\u043e <b>\u0432 \u0441\u0432\u043e\u0435\u0439 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0435<\/b>. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u043e\u0431\u043b\u0430\u0434\u0430\u0442\u0435\u043b\u0438 \u0431\u0430\u0437 \u043d\u0430 win-1251 (\u0438\u043d\u043e\u0433\u0434\u0430 \u0443\u0434\u043e\u0431\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0434\u0438 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0438 \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430, \u0435\u0441\u043b\u0438 \u00ab\u0447\u0435\u0441\u0442\u043d\u044b\u0439\u00bb \u043c\u043d\u043e\u0433\u043e\u0431\u0430\u0439\u0442\u043e\u0432\u044b\u0439 UNICODE \u043d\u0435 \u043d\u0443\u0436\u0435\u043d) \u0441\u043c\u043e\u0433\u043b\u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0443 \u0441\u0435\u0431\u044f \u043f\u043b\u0430\u043d\u044b \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u0438\u043c\u0438 \u00ab\u0440\u0443\u0441\u0441\u043a\u0438\u043c\u0438\u00bb \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/mb\/6w\/ri\/mb6wriic6gmbvaz0koz8vddn_gm.png\"><\/p>\n<h4>\u0414\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434<\/h4>\n<p>  \u0411\u0435\u0434\u0430-\u0431\u0435\u0434\u0430\u2026 \u041f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0432\u0441\u0435 \u0442\u0430\u043a\u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430\u0440\u0435\u0437\u043a\u0443 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u043e \u0443\u0436\u0435 \u0441 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f\u043c\u0438 \u0442\u0438\u043f\u0430 <a href=\"https:\/\/nodejs.org\/dist\/latest-v12.x\/docs\/api\/buffer.html#buffer_buf_indexof_value_byteoffset_encoding\"><code>Buffer.indexOf()<\/code><\/a> \u0432\u043c\u0435\u0441\u0442\u043e \u00ab\u043f\u043e\u0431\u0430\u0439\u0442\u043d\u043e\u0433\u043e\u00bb \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ii\/kf\/h0\/iikfh0v9mn2pyjd56eislxit69a.png\"><\/p>\n<p>  \u0412\u0440\u043e\u0434\u0435 \u0432\u0441\u0435 \u0445\u043e\u0440\u043e\u0448\u043e, \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u043a\u043e\u043d\u0442\u0443\u0440\u0435 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0435 \u0432\u044b\u0440\u043e\u0441\u043b\u0430, win1251-\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0447\u0438\u043d\u0438\u043b\u0438\u0441\u044c, \u0432\u044b\u043a\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430 \u0431\u043e\u0439\u2026 \u0422\u0430-\u0434\u0430\u043c! <b>CPU usage \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u043e\u0431\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0442\u043e\u043b\u043e\u043a \u0432 100%<\/b>:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/0r\/k_\/3u\/0rk_3ujn57ml6uf2qs5xiuztnto.png\"><\/p>\n<p>  \u041a\u0430\u043a \u0436\u0435 \u0442\u0430\u043a?.. \u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0432\u043e \u0432\u0441\u0435\u043c \u0432\u0438\u043d\u043e\u0432\u0430\u0442 <code>Buffer.concat<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u044b \u00ab\u043f\u043e\u0434\u043a\u043b\u0435\u0438\u0432\u0430\u0435\u043c \u0445\u0432\u043e\u0441\u0442\u00bb, \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0439\u0441\u044f \u043e\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0431\u043b\u043e\u043a\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/j6\/nx\/hw\/j6nxhw_xyt8rhrz9z9dlfbaz7fo.png\"><\/p>\n<p>  \u041d\u043e \u0432\u0435\u0434\u044c \u0443 \u043d\u0430\u0441 \u0441\u043a\u043b\u0435\u0439\u043a\u0430 \u0438\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e <b>\u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 \u0431\u043b\u043e\u043a<\/b>, \u0430 \u0438\u0445 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u2014 \u043f\u0440\u0430\u0432\u0434\u0430-\u043f\u0440\u0430\u0432\u0434\u0430?.. \u041d\u0443, \u043f\u043e\u0447\u0442\u0438. \u0422\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u0442 \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 <b>\u00ab\u0441\u0442\u0440\u043e\u043a\u0438\u00bb \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u043e\u0442\u0435\u043d 16KB-\u0441\u0435\u0433\u043c\u0435\u043d\u0442\u043e\u0432<\/b>:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/iq\/rk\/54\/iqrk54dnsrr9xhfgvawz5pptc90.png\"><\/p>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u043a\u043e\u043b\u043b\u0435\u0433\u0430\u043c-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0430\u0431\u043e\u0442\u0438\u043b\u0438\u0441\u044c \u0442\u0430\u043a\u043e\u0435 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0421\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u043d\u043e \u00ab\u0440\u0435\u0434\u043a\u043e, \u043d\u043e \u043c\u0435\u0442\u043a\u043e\u00bb, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u043a\u043e\u043d\u0442\u0443\u0440\u0435 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c.<\/p>\n<p>  \u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e <b>\u043f\u043e\u0434\u043a\u043b\u0435\u0439\u043a\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0442\u0435\u043d \u0440\u0430\u0437 \u043a \u0431\u0443\u0444\u0435\u0440\u0443 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0433\u0430\u0431\u0430\u0439\u0442<\/b> \u043c\u0435\u043b\u043a\u0438\u0445 \u043a\u0443\u0441\u043e\u0447\u043a\u043e\u0432 \u2014 \u043f\u0440\u044f\u043c\u043e\u0439 \u043f\u0443\u0442\u044c \u0432 \u0431\u0435\u0437\u0434\u043d\u0443 \u043f\u0435\u0440\u0435\u0430\u043b\u043b\u043e\u043a\u0430\u0446\u0438\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0441 \u0432\u044b\u0435\u0434\u0430\u043d\u0438\u0435\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 CPU, \u0447\u0442\u043e \u043c\u044b \u0438 \u043f\u0440\u043e\u043d\u0430\u0431\u043b\u044e\u0434\u0430\u043b\u0438. \u0422\u0430\u043a \u0430 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u043a\u043b\u0435\u0438\u0442\u044c, \u043f\u043e\u043a\u0430 \u0441\u0442\u0440\u043e\u043a\u0430 \u043d\u0435 \u043a\u043e\u043d\u0447\u0438\u043b\u0430\u0441\u044c \u0441\u043e\u0432\u0441\u0435\u043c. \u041f\u0440\u043e\u0441\u0442\u043e <b>\u0431\u0443\u0434\u0435\u043c \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u00ab\u043a\u0443\u0441\u043e\u0447\u043a\u0438\u00bb \u0432 \u043c\u0430\u0441\u0441\u0438\u0432<\/b>, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0441\u0442\u0430\u043d\u0435\u0442 \u043f\u043e\u0440\u0430 \u043e\u0442\u0434\u0430\u0442\u044c \u0432\u0441\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u00ab\u043d\u0430\u0440\u0443\u0436\u0443\u00bb:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/5i\/d8\/ol\/5id8olet5wr0mxddkn4u3ieuwu0.png\"><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0441\u043d\u043e\u0432\u0430 \u0432\u0435\u0440\u043d\u0443\u043b\u0430\u0441\u044c \u043a \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0430\u0432\u0430\u043b readline.<\/p>\n<h2>\u041f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438<\/h2>\n<p>  \u041c\u043d\u043e\u0433\u0438\u0435, \u043a\u0442\u043e \u043f\u0438\u0441\u0430\u043b \u043d\u0430 \u044f\u0437\u044b\u043a\u0430\u0445 \u0441 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u043f\u0430\u043c\u044f\u0442\u0438, \u0432 \u043a\u0443\u0440\u0441\u0435, \u0447\u0442\u043e \u043e\u0434\u043d\u0430 \u0438\u0437 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0445 \u00ab\u0443\u0431\u0438\u0439\u0446 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438\u00bb \u2014 \u044d\u0442\u043e <b>\u0444\u043e\u043d\u043e\u0432\u0430\u044f \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u00ab\u0441\u0431\u043e\u0440\u0449\u0438\u043a\u0430 \u043c\u0443\u0441\u043e\u0440\u0430\u00bb<\/b> (Garbage Collector, GC), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0438\u043a\u043e\u043c\u0443 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f. \u041d\u0430\u0441\u0442\u0438\u0433\u043b\u0430 \u044d\u0442\u0430 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0438 \u043d\u0430\u0441 \u2014 \u0432 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u044b \u043d\u0430\u0447\u0430\u043b\u0438 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u044c, \u0447\u0442\u043e \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 GC \u043a\u0430\u043a-\u0442\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0443\u0436 \u043c\u043d\u043e\u0433\u043e, \u0438 \u043d\u0435 \u043a \u043c\u0435\u0441\u0442\u0443.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/hg\/pp\/ht\/hgppht17ouvqyv9xdqv7wf4n5kq.png\"><\/p>\n<p>  <a href=\"https:\/\/gist.github.com\/listochkin\/10973974\">\u0422\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u00ab\u043a\u0440\u0443\u0442\u0438\u043b\u043a\u0438\u00bb<\/a> \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u043b\u0438\u2026 \u00ab\u0415\u0441\u043b\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u2014 \u0441\u0434\u0435\u043b\u0430\u0439 \u0434\u0430\u043c\u043f!\u00bb \u0418 \u043d\u0430\u0440\u043e\u0434\u043d\u0430\u044f \u043c\u0443\u0434\u0440\u043e\u0441\u0442\u044c \u043d\u0435 \u043f\u043e\u0434\u0432\u0435\u043b\u0430 \u2014 \u043c\u044b \u0443\u0432\u0438\u0434\u0435\u043b\u0438 <b>\u0442\u0443\u0447\u0443 Buffer \u043f\u043e 8360 \u0431\u0430\u0439\u0442<\/b> \u043e\u0431\u0449\u0438\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u043d\u0430 520MB\u2026<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/s7\/ct\/km\/s7ctkmzfmorz0qhbsaw1v3aorpw.png\"><\/p>\n<p>  \u041f\u0440\u0438\u0447\u0435\u043c \u043f\u043e\u0440\u043e\u0436\u0434\u0435\u043d\u044b \u043e\u043d\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 CopyBinaryStream \u2014 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u044f\u0441\u043d\u044f\u0442\u044c\u0441\u044f\u2026<\/p>\n<h4>COPY\u2026 FROM STDIN WITH BINARY<\/h4>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u043d\u0430 \u0411\u0414 \u0442\u0440\u0430\u0444\u0438\u043a\u0430, \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <a href=\"https:\/\/postgrespro.ru\/docs\/postgresql\/12\/sql-copy#id-1.9.3.55.9.4\">\u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 COPY<\/a>. \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u043d\u0443\u0436\u043d\u043e \u0432 \u043f\u043e\u0442\u043e\u043a \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0431\u0443\u0444\u0435\u0440, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0438\u0437 \u00ab\u043a\u0443\u0441\u043e\u0447\u043a\u043e\u0432\u00bb \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u043b\u0435\u0439 \u0432 \u0437\u0430\u043f\u0438\u0441\u0438 (2 \u0431\u0430\u0439\u0442\u0430) \u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 (4 \u0431\u0430\u0439\u0442\u0430 \u043d\u0430 ID \u0442\u0438\u043f\u0430 + \u0434\u0430\u043d\u043d\u044b\u0435).<\/p>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u00ab\u0441\u0443\u043c\u043c\u0430\u0440\u043d\u043e\u00bb \u0442\u0430\u043a\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u043c\u0435\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0434\u043b\u0438\u043d\u0443, \u0442\u043e \u0441\u0440\u0430\u0437\u0443 \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c <b>\u0431\u0443\u0444\u0435\u0440 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u044b \u2014 \u043d\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442<\/b>, \u043f\u0435\u0440\u0435\u0430\u043b\u043b\u043e\u043a\u0430\u0446\u0438\u0438 \u043f\u0440\u0438 \u043d\u0435\u0445\u0432\u0430\u0442\u043a\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u043b\u0435\u0433\u043a\u043e \u00ab\u0434\u043e\u0435\u0434\u044f\u0442\u00bb \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0443\u0436\u0435 \u043f\u0440\u043e\u0448\u043b\u0438 \u0432\u044b\u0448\u0435. \u0417\u043d\u0430\u0447\u0438\u0442, \u0442\u043e\u0436\u0435 \u0441\u0442\u043e\u0438\u0442 \u00ab\u043a\u043b\u0435\u0438\u0442\u044c \u0438\u0437 \u043a\u0443\u0441\u043e\u0447\u043a\u043e\u0432\u00bb \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/nodejs.org\/dist\/latest-v12.x\/docs\/api\/buffer.html#buffer_class_method_buffer_concat_list_totallength\"><code>Buffer.concat()<\/code><\/a>.<\/p>\n<h4>memo<\/h4>\n<p>  \u041d\u0443 \u0430 \u0440\u0430\u0437 \u0443 \u043d\u0430\u0441 \u043c\u043d\u043e\u0433\u0438\u0435 \u043a\u0443\u0441\u043e\u0447\u043a\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0442\u0441\u044f \u0441\u043d\u043e\u0432\u0430 \u0438 \u0441\u043d\u043e\u0432\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u0435\u0439 \u0432 \u0437\u0430\u043f\u0438\u0441\u044f\u0445 \u043e\u0434\u043d\u043e\u0439 \u0438 \u0442\u043e\u0439 \u0436\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b) \u2014 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0445 <b>\u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0442\u044c, \u0430 \u043f\u043e\u0442\u043e\u043c \u0431\u0440\u0430\u0442\u044c \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u0435<\/b>, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043e\u0434\u043d\u043e\u043a\u0440\u0430\u0442\u043d\u043e \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438. \u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 COPY-\u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u2014 \u0442\u0438\u043f\u043e\u0432\u044b\u0435 \u043a\u0443\u0441\u043e\u0447\u043a\u0438 \u0431\u044b\u0432\u0430\u044e\u0442 \u043f\u043e 1, 2 \u0438\u043b\u0438 4 \u0431\u0430\u0439\u0442\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/dx\/32\/c2\/dx32c2pramljew4m2x2ztitewio.png\"><\/p>\n<p>  \u0418\u2026 \u0431\u0430\u043c, \u043f\u0440\u0438\u043b\u0435\u0442\u0435\u043b\u0438 \u0433\u0440\u0430\u0431\u043b\u0438!<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/5e\/vd\/mx\/5evdmx_4gln9ccxajf2weqv2z4w.png\"><\/p>\n<p>  \u0422\u043e \u0435\u0441\u0442\u044c \u0434\u0430, \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 Buffer \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0443\u0441\u043e\u043a \u043f\u0430\u043c\u044f\u0442\u0438 8KB, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 <i><b>\u043f\u043e\u0434\u0440\u044f\u0434<\/b><\/i> \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0431\u0443\u0444\u0435\u0440\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u00ab\u0440\u044f\u0434\u043e\u043c\u00bb \u0432 \u0443\u0436\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438. \u0410 \u043d\u0430\u0448\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b\u043e \u00ab\u043f\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044e\u00bb, \u0438 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u00ab\u0440\u044f\u0434\u043e\u043c\u00bb \u2014 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u0430\u0436\u0434\u044b\u0439 \u043d\u0430\u0448 <b>\u0431\u0443\u0444\u0435\u0440 \u043d\u0430 1-2-4 \u0431\u0430\u0439\u0442\u0430 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u043b 8KB + \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a<\/b> \u2014 \u0432\u043e\u0442 \u043e\u043d\u0438, \u043d\u0430\u0448\u0438 520MB!<\/p>\n<h4>smart memo<\/h4>\n<p>  \u0425\u043c\u2026 \u0410 \u0437\u0430\u0447\u0435\u043c \u043d\u0430\u043c \u0432\u043e\u043e\u0431\u0449\u0435 \u0436\u0434\u0430\u0442\u044c, \u043f\u043e\u043a\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u0442 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 1\/2-\u0431\u0430\u0439\u0442\u043e\u0432\u044b\u0439 \u0431\u0443\u0444\u0435\u0440? \u0421 4-\u0431\u0430\u0439\u0442\u043e\u0432\u044b\u043c\u0438 \u0442\u0435\u043c\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f, \u043d\u043e \u044d\u0442\u0438\u0445-\u0442\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0432\u0441\u0435\u0433\u043e 256 + 65536. \u0422\u0430\u043a \u0434\u0430\u0432\u0430\u0439\u0442\u0435<b> \u043d\u0430\u0433\u0435\u043d\u0435\u0440\u0438\u043c \u0438\u0445 <u>\u043f\u043e\u0434\u0440\u044f\u0434<\/u> \u0432\u0441\u0435 \u0441\u0440\u0430\u0437\u0443<\/b>! \u0417\u0430\u043e\u0434\u043d\u043e \u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0437 \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u043f\u0438\u043b\u0438\u043c \u2014 \u0435\u0449\u0435 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/fs\/yq\/ge\/fsyqgetrrresipf9qmqpifnt-ku.png\"><\/p>\n<p>  \u0422\u043e \u0435\u0441\u0442\u044c \u043a\u0440\u043e\u043c\u0435 1\/2-\u0431\u0430\u0439\u0442\u043e\u0432\u044b\u0445 \u0431\u0443\u0444\u0435\u0440\u043e\u0432 \u0441\u0440\u0430\u0437\u0443 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0438 \u0441\u0430\u043c\u044b\u0435 \u0445\u043e\u0434\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f (\u043d\u0438\u0436\u043d\u0438\u0435 2 \u0431\u0430\u0439\u0442\u0430 \u0438 -1) \u0434\u043b\u044f 4-\u0431\u0430\u0439\u0442\u043e\u0432\u044b\u0445. \u0418 \u2014 \u044d\u0442\u043e \u043f\u043e\u043c\u043e\u0433\u043b\u043e, \u0432\u0441\u0435\u0433\u043e 10MB \u0432\u043c\u0435\u0441\u0442\u043e 520MB!<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/7l\/7h\/ot\/7l7hotlahibczpu7nvmjsdxxo7a.png\"><\/div>\n<p> \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\/company\/tensor\/blog\/488678\/\"> https:\/\/habr.com\/ru\/company\/tensor\/blog\/488678\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/tensor\/blog\/488678\/\">\u042f \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043f\u0440\u043e <a href=\"https:\/\/habr.com\/post\/487380\/\">\u0441\u0435\u0440\u0432\u0438\u0441 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a PostgreSQL<\/a>, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u043e\u043d\u043b\u0430\u0439\u043d-\u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0445 \u043b\u043e\u0433\u043e\u0432, \u0447\u044c\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u2014 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043a\u0438 \u043b\u043e\u0433\u043e\u0432 \u0441\u0440\u0430\u0437\u0443 \u0441 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0445\u043e\u0441\u0442\u043e\u0432, \u0431\u044b\u0441\u0442\u0440\u043e \u0438\u0445 <b>\u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0438<\/b>, \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043f\u0430\u043a\u0435\u0442\u044b \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438 <b>\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432 PostgreSQL<\/b>-\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/vk\/dn\/xj\/vkdnxj5l8luuvnk31xevce4auae.png\"><\/p>\n<p>  \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e <a href=\"https:\/\/sbis.ru\/all_services\">\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u043e\u0442\u043d\u044f\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432<\/a> \u0438 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u0430\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u043f\u043b\u0430\u043d\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 <b>\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 100GB \u043b\u043e\u0433\u043e\u0432 \u0432 \u0434\u0435\u043d\u044c<\/b>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u044b\u043b\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u0438, \u0447\u0442\u043e \u043b\u044c\u0432\u0438\u043d\u0430\u044f \u0434\u043e\u043b\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0442\u0440\u0430\u0442\u0438\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u0434\u0432\u0435 \u044d\u0442\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438: \u0440\u0430\u0437\u0431\u043e\u0440 \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0431\u0430\u0437\u0443.<\/p>\n<p>  \u041c\u044b \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u043b\u0438\u0441\u044c \u0432 \u043d\u0435\u0434\u0440\u0430 \u043f\u0440\u043e\u0444\u0430\u0439\u043b\u0435\u0440\u0430 \u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 <a href=\"https:\/\/nodejs.org\/dist\/latest-v12.x\/docs\/api\/buffer.html\"><code>Buffer<\/code><\/a> \u0432 Node.js, \u0437\u043d\u0430\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u0441\u0438\u043b\u044c\u043d\u043e \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u0432\u0430\u0448\u0435 \u0432\u0440\u0435\u043c\u044f \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b.  <\/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-299206","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/299206","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=299206"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/299206\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=299206"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=299206"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=299206"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}