<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="he">
	<id>https://chabadpedia.co.il/index.php?action=history&amp;feed=atom&amp;title=%D7%99%D7%97%D7%99%D7%93%D7%94%3ABase64</id>
	<title>יחידה:Base64 - היסטוריית גרסאות</title>
	<link rel="self" type="application/atom+xml" href="https://chabadpedia.co.il/index.php?action=history&amp;feed=atom&amp;title=%D7%99%D7%97%D7%99%D7%93%D7%94%3ABase64"/>
	<link rel="alternate" type="text/html" href="https://chabadpedia.co.il/index.php?title=%D7%99%D7%97%D7%99%D7%93%D7%94:Base64&amp;action=history"/>
	<updated>2026-04-20T07:00:34Z</updated>
	<subtitle>היסטוריית הגרסאות של הדף הזה בוויקי</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://chabadpedia.co.il/index.php?title=%D7%99%D7%97%D7%99%D7%93%D7%94:Base64&amp;diff=804337&amp;oldid=prev</id>
		<title>מ. רובין: יצירת דף עם התוכן &quot;-- following snippet copied from http://lua-users.org/wiki/BaseSixtyFour and is published under GPL&#039; which should be compatible enough with CC.  -- Lua 5.1+ base64 v3.0 (c) 2009 by Alex Kloss &lt;alexthkloss@web.de&gt; -- licensed under the terms of the LGPL2 -- character table string   local b=&#039;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/&#039;  -- encoding local enc = function(data)     return ((data:gsub(&#039;.&#039;, function(x)          local r,b=&#039;...&quot;</title>
		<link rel="alternate" type="text/html" href="https://chabadpedia.co.il/index.php?title=%D7%99%D7%97%D7%99%D7%93%D7%94:Base64&amp;diff=804337&amp;oldid=prev"/>
		<updated>2025-09-29T21:50:07Z</updated>

		<summary type="html">&lt;p&gt;יצירת דף עם התוכן &amp;quot;--[[ following snippet copied from http://lua-users.org/wiki/BaseSixtyFour and is published under GPL&amp;#039; which should be compatible enough with CC.  -- Lua 5.1+ base64 v3.0 (c) 2009 by Alex Kloss &amp;lt;alexthkloss@web.de&amp;gt; -- licensed under the terms of the LGPL2 -- character table string ]]  local b=&amp;#039;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/&amp;#039;  -- encoding local enc = function(data)     return ((data:gsub(&amp;#039;.&amp;#039;, function(x)          local r,b=&amp;#039;...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;דף חדש&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--[[&lt;br /&gt;
following snippet copied from http://lua-users.org/wiki/BaseSixtyFour&lt;br /&gt;
and is published under GPL&amp;#039; which should be compatible enough with CC.&lt;br /&gt;
&lt;br /&gt;
-- Lua 5.1+ base64 v3.0 (c) 2009 by Alex Kloss &amp;lt;alexthkloss@web.de&amp;gt;&lt;br /&gt;
-- licensed under the terms of the LGPL2&lt;br /&gt;
-- character table string&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local b=&amp;#039;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/&amp;#039;&lt;br /&gt;
&lt;br /&gt;
-- encoding&lt;br /&gt;
local enc = function(data)&lt;br /&gt;
    return ((data:gsub(&amp;#039;.&amp;#039;, function(x) &lt;br /&gt;
        local r,b=&amp;#039;&amp;#039;,x:byte()&lt;br /&gt;
        for i=8,1,-1 do r=r..(b%2^i-b%2^(i-1)&amp;gt;0 and &amp;#039;1&amp;#039; or &amp;#039;0&amp;#039;) end&lt;br /&gt;
        return r;&lt;br /&gt;
    end)..&amp;#039;0000&amp;#039;):gsub(&amp;#039;%d%d%d?%d?%d?%d?&amp;#039;, function(x)&lt;br /&gt;
        if (#x &amp;lt; 6) then return &amp;#039;&amp;#039; end&lt;br /&gt;
        local c=0&lt;br /&gt;
        for i=1,6 do c=c+(x:sub(i,i)==&amp;#039;1&amp;#039; and 2^(6-i) or 0) end&lt;br /&gt;
        return b:sub(c+1,c+1)&lt;br /&gt;
    end)..({ &amp;#039;&amp;#039;, &amp;#039;==&amp;#039;, &amp;#039;=&amp;#039; })[#data%3+1])&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- decoding&lt;br /&gt;
-- the two extra parameters ar not in original code. added for hewiki.&lt;br /&gt;
local dec = function(data, uridecode, jsondecode)&lt;br /&gt;
    data = string.gsub(data, &amp;#039;[^&amp;#039;..b..&amp;#039;=]&amp;#039;, &amp;#039;&amp;#039;)&lt;br /&gt;
    local result = (data:gsub(&amp;#039;.&amp;#039;, function(x)&lt;br /&gt;
        if (x == &amp;#039;=&amp;#039;) then return &amp;#039;&amp;#039; end&lt;br /&gt;
        local r,f=&amp;#039;&amp;#039;,(b:find(x)-1)&lt;br /&gt;
        for i=6,1,-1 do r=r..(f%2^i-f%2^(i-1)&amp;gt;0 and &amp;#039;1&amp;#039; or &amp;#039;0&amp;#039;) end&lt;br /&gt;
        return r;&lt;br /&gt;
    end):gsub(&amp;#039;%d%d%d?%d?%d?%d?%d?%d?&amp;#039;, function(x)&lt;br /&gt;
        if (#x ~= 8) then return &amp;#039;&amp;#039; end&lt;br /&gt;
        local c=0&lt;br /&gt;
        for i=1,8 do c=c+(x:sub(i,i)==&amp;#039;1&amp;#039; and 2^(8-i) or 0) end&lt;br /&gt;
        return string.char(c)&lt;br /&gt;
    end))&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
-- next 3 lines added for hewiki. original code had &amp;quot;return&amp;quot; instead of &amp;quot;local result&amp;quot;.    &lt;br /&gt;
	result = ( uridecode and mw.uri.decode( result ) ) or result&lt;br /&gt;
	result = ( jsondecode and mw.text.jsonDecode( result ) ) or result&lt;br /&gt;
	return result&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
return { [&amp;quot;encode&amp;quot;] = enc, [&amp;quot;decode&amp;quot;] = dec }&lt;/div&gt;</summary>
		<author><name>מ. רובין</name></author>
	</entry>
</feed>