prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Delete base85 algorithm
  ### Describe your change:
  Re #6216
  
  Normally, I'm not in favour of just deleting algorithms, but I would make the argument that this is not an algorithm, rather just a snippet of code that utilises another library.
  
  Per `CONTRIBTUING.md`
  > Algorithms in this repo should not be how-to examples for existing Python packages. Instead, they should perform internal calculations or manipulations to convert input values into different output values
  This `base85` algorithm has essentially got two lines of code that purely utilise a singular library. The doctests only test an external library
  
  This repository should not contains examples on how to use a certain library, that would be the library documentation here
  https://docs.python.org/3/library/base64.html
  
  
  * [ ] Add an algorithm?
  * [ ] Fix a bug or typo in an existing algorithm?
  * [ ] Documentation change?
  * [x] Delete an algorithm
  
  ### Checklist:
  * [x] I have read [CONTRIBUTING.md](https://github.com/TheAlgorithms/Python/blob/master/CONTRIBUTING.md).
  * [x] This pull request is all my own work -- I have not plagiarized.
  * [x] I know that pull requests will not be merged if they fail the automated tests.
  * [x] This PR only changes one algorithm file.  To ease review, please open separate PRs for separate algorithms.
  * [x] All new Python files are placed inside an existing directory.
  * [x] All filenames are in all lowercase characters with no spaces or dashes.
  * [x] All functions and variable names follow Python naming conventions.
  * [x] All function parameters and return values are annotated with Python [type hints](https://docs.python.org/3/library/typing.html).
  * [x] All functions have [doctests](https://docs.python.org/3/library/doctest.html) that pass the automated testing.
  * [x] All new algorithms include at least one URL that points to Wikipedia or another similar explanation.
  * [x] If this pull request resolves one or more open issues then the description above includes the issue number(s) with a [closing keyword](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue): "Fixes #ISSUE-NUMBER".
  
  
  </issue>
  <code>
  [start of ciphers/base32.py]
  1 import base64
  2 
  3 
  4 def base32_encode(string: str) -> bytes:
  5     """
  6     Encodes a given string to base32, returning a bytes-like object
  7     >>> base32_encode("Hello World!")
  8     b'JBSWY3DPEBLW64TMMQQQ===='
  9     >>> base32_encode("123456")
  10     b'GEZDGNBVGY======'
  11     >>> base32_encode("some long complex string")
  12     b'ONXW2ZJANRXW4ZZAMNXW24DMMV4CA43UOJUW4ZY='
  13     """
  14 
  15     # encoded the input (we need a bytes like object)
  16     # then, b32encoded the bytes-like object
  17     return base64.b32encode(string.encode("utf-8"))
  18 
  19 
  20 def base32_decode(encoded_bytes: bytes) -> str:
  21     """
  22     Decodes a given bytes-like object to a string, returning a string
  23     >>> base32_decode(b'JBSWY3DPEBLW64TMMQQQ====')
  24     'Hello World!'
  25     >>> base32_decode(b'GEZDGNBVGY======')
  26     '123456'
  27     >>> base32_decode(b'ONXW2ZJANRXW4ZZAMNXW24DMMV4CA43UOJUW4ZY=')
  28     'some long complex string'
  29     """
  30 
  31     # decode the bytes from base32
  32     # then, decode the bytes-like object to return as a string
  33     return base64.b32decode(encoded_bytes).decode("utf-8")
  34 
  35 
  36 if __name__ == "__main__":
  37     test = "Hello World!"
  38     encoded = base32_encode(test)
  39     print(encoded)
  40 
  41     decoded = base32_decode(encoded)
  42     print(decoded)
  43
  [end of ciphers/base32.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/ciphers/base32.py b/ciphers/base32.py
  --- a/ciphers/base32.py
  +++ b/ciphers/base32.py
  @@ -1,42 +1,45 @@
  -import base64
  +"""
  +Base32 encoding and decoding
   
  +https://en.wikipedia.org/wiki/Base32
  +"""
  +B32_CHARSET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"
   
  -def base32_encode(string: str) -> bytes:
  +
  +def base32_encode(data: bytes) -> bytes:
       """
  -    Encodes a given string to base32, returning a bytes-like object
  -    >>> base32_encode("Hello World!")
  +    >>> base32_encode(b"Hello World!")
       b'JBSWY3DPEBLW64TMMQQQ===='
  -    >>> base32_encode("123456")
  +    >>> base32_encode(b"123456")
       b'GEZDGNBVGY======'
  -    >>> base32_encode("some long complex string")
  +    >>> base32_encode(b"some long complex string")
       b'ONXW2ZJANRXW4ZZAMNXW24DMMV4CA43UOJUW4ZY='
       """
  -
  -    # encoded the input (we need a bytes like object)
  -    # then, b32encoded the bytes-like object
  -    return base64.b32encode(string.encode("utf-8"))
  +    binary_data = "".join(bin(ord(d))[2:].zfill(8) for d in data.decode("utf-8"))
  +    binary_data = binary_data.ljust(5 * ((len(binary_data) // 5) + 1), "0")
  +    b32_chunks = map("".join, zip(*[iter(binary_data)] * 5))
  +    b32_result = "".join(B32_CHARSET[int(chunk, 2)] for chunk in b32_chunks)
  +    return bytes(b32_result.ljust(8 * ((len(b32_result) // 8) + 1), "="), "utf-8")
   
   
  -def base32_decode(encoded_bytes: bytes) -> str:
  +def base32_decode(data: bytes) -> bytes:
       """
  -    Decodes a given bytes-like object to a string, returning a string
       >>> base32_decode(b'JBSWY3DPEBLW64TMMQQQ====')
  -    'Hello World!'
  +    b'Hello World!'
       >>> base32_decode(b'GEZDGNBVGY======')
  -    '123456'
  +    b'123456'
       >>> base32_decode(b'ONXW2ZJANRXW4ZZAMNXW24DMMV4CA43UOJUW4ZY=')
  -    'some long complex string'
  +    b'some long complex string'
       """
  -
  -    # decode the bytes from base32
  -    # then, decode the bytes-like object to return as a string
  -    return base64.b32decode(encoded_bytes).decode("utf-8")
  +    binary_chunks = "".join(
  +        bin(B32_CHARSET.index(_d))[2:].zfill(5)
  +        for _d in data.decode("utf-8").strip("=")
  +    )
  +    binary_data = list(map("".join, zip(*[iter(binary_chunks)] * 8)))
  +    return bytes("".join([chr(int(_d, 2)) for _d in binary_data]), "utf-8")
   
   
   if __name__ == "__main__":
  -    test = "Hello World!"
  -    encoded = base32_encode(test)
  -    print(encoded)
  +    import doctest
   
  -    decoded = base32_decode(encoded)
  -    print(decoded)
  +    doctest.testmod()
  
verification_info: {"golden_diff": "diff --git a/ciphers/base32.py b/ciphers/base32.py\n--- a/ciphers/base32.py\n+++ b/ciphers/base32.py\n@@ -1,42 +1,45 @@\n-import base64\n+\"\"\"\n+Base32 encoding and decoding\n \n+https://en.wikipedia.org/wiki/Base32\n+\"\"\"\n+B32_CHARSET = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\"\n \n-def base32_encode(string: str) -> bytes:\n+\n+def base32_encode(data: bytes) -> bytes:\n     \"\"\"\n-    Encodes a given string to base32, returning a bytes-like object\n-    >>> base32_encode(\"Hello World!\")\n+    >>> base32_encode(b\"Hello World!\")\n     b'JBSWY3DPEBLW64TMMQQQ===='\n-    >>> base32_encode(\"123456\")\n+    >>> base32_encode(b\"123456\")\n     b'GEZDGNBVGY======'\n-    >>> base32_encode(\"some long complex string\")\n+    >>> base32_encode(b\"some long complex string\")\n     b'ONXW2ZJANRXW4ZZAMNXW24DMMV4CA43UOJUW4ZY='\n     \"\"\"\n-\n-    # encoded the input (we need a bytes like object)\n-    # then, b32encoded the bytes-like object\n-    return base64.b32encode(string.encode(\"utf-8\"))\n+    binary_data = \"\".join(bin(ord(d))[2:].zfill(8) for d in data.decode(\"utf-8\"))\n+    binary_data = binary_data.ljust(5 * ((len(binary_data) // 5) + 1), \"0\")\n+    b32_chunks = map(\"\".join, zip(*[iter(binary_data)] * 5))\n+    b32_result = \"\".join(B32_CHARSET[int(chunk, 2)] for chunk in b32_chunks)\n+    return bytes(b32_result.ljust(8 * ((len(b32_result) // 8) + 1), \"=\"), \"utf-8\")\n \n \n-def base32_decode(encoded_bytes: bytes) -> str:\n+def base32_decode(data: bytes) -> bytes:\n     \"\"\"\n-    Decodes a given bytes-like object to a string, returning a string\n     >>> base32_decode(b'JBSWY3DPEBLW64TMMQQQ====')\n-    'Hello World!'\n+    b'Hello World!'\n     >>> base32_decode(b'GEZDGNBVGY======')\n-    '123456'\n+    b'123456'\n     >>> base32_decode(b'ONXW2ZJANRXW4ZZAMNXW24DMMV4CA43UOJUW4ZY=')\n-    'some long complex string'\n+    b'some long complex string'\n     \"\"\"\n-\n-    # decode the bytes from base32\n-    # then, decode the bytes-like object to return as a string\n-    return base64.b32decode(encoded_bytes).decode(\"utf-8\")\n+    binary_chunks = \"\".join(\n+        bin(B32_CHARSET.index(_d))[2:].zfill(5)\n+        for _d in data.decode(\"utf-8\").strip(\"=\")\n+    )\n+    binary_data = list(map(\"\".join, zip(*[iter(binary_chunks)] * 8)))\n+    return bytes(\"\".join([chr(int(_d, 2)) for _d in binary_data]), \"utf-8\")\n \n \n if __name__ == \"__main__\":\n-    test = \"Hello World!\"\n-    encoded = base32_encode(test)\n-    print(encoded)\n+    import doctest\n \n-    decoded = base32_decode(encoded)\n-    print(decoded)\n+    doctest.testmod()\n", "issue": "Delete base85 algorithm\n### Describe your change:\r\nRe #6216\r\n\r\nNormally, I'm not in favour of just deleting algorithms, but I would make the argument that this is not an algorithm, rather just a snippet of code that utilises another library.\r\n\r\nPer `CONTRIBTUING.md`\r\n> Algorithms in this repo should not be how-to examples for existing Python packages. Instead, they should perform internal calculations or manipulations to convert input values into different output values\r\nThis `base85` algorithm has essentially got two lines of code that purely utilise a singular library. The doctests only test an external library\r\n\r\nThis repository should not contains examples on how to use a certain library, that would be the library documentation here\r\nhttps://docs.python.org/3/library/base64.html\r\n\r\n\r\n* [ ] Add an algorithm?\r\n* [ ] Fix a bug or typo in an existing algorithm?\r\n* [ ] Documentation change?\r\n* [x] Delete an algorithm\r\n\r\n### Checklist:\r\n* [x] I have read [CONTRIBUTING.md](https://github.com/TheAlgorithms/Python/blob/master/CONTRIBUTING.md).\r\n* [x] This pull request is all my own work -- I have not plagiarized.\r\n* [x] I know that pull requests will not be merged if they fail the automated tests.\r\n* [x] This PR only changes one algorithm file.  To ease review, please open separate PRs for separate algorithms.\r\n* [x] All new Python files are placed inside an existing directory.\r\n* [x] All filenames are in all lowercase characters with no spaces or dashes.\r\n* [x] All functions and variable names follow Python naming conventions.\r\n* [x] All function parameters and return values are annotated with Python [type hints](https://docs.python.org/3/library/typing.html).\r\n* [x] All functions have [doctests](https://docs.python.org/3/library/doctest.html) that pass the automated testing.\r\n* [x] All new algorithms include at least one URL that points to Wikipedia or another similar explanation.\r\n* [x] If this pull request resolves one or more open issues then the description above includes the issue number(s) with a [closing keyword](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue): \"Fixes #ISSUE-NUMBER\".\r\n\n", "before_files": [{"content": "import base64\n\n\ndef base32_encode(string: str) -> bytes:\n    \"\"\"\n    Encodes a given string to base32, returning a bytes-like object\n    >>> base32_encode(\"Hello World!\")\n    b'JBSWY3DPEBLW64TMMQQQ===='\n    >>> base32_encode(\"123456\")\n    b'GEZDGNBVGY======'\n    >>> base32_encode(\"some long complex string\")\n    b'ONXW2ZJANRXW4ZZAMNXW24DMMV4CA43UOJUW4ZY='\n    \"\"\"\n\n    # encoded the input (we need a bytes like object)\n    # then, b32encoded the bytes-like object\n    return base64.b32encode(string.encode(\"utf-8\"))\n\n\ndef base32_decode(encoded_bytes: bytes) -> str:\n    \"\"\"\n    Decodes a given bytes-like object to a string, returning a string\n    >>> base32_decode(b'JBSWY3DPEBLW64TMMQQQ====')\n    'Hello World!'\n    >>> base32_decode(b'GEZDGNBVGY======')\n    '123456'\n    >>> base32_decode(b'ONXW2ZJANRXW4ZZAMNXW24DMMV4CA43UOJUW4ZY=')\n    'some long complex string'\n    \"\"\"\n\n    # decode the bytes from base32\n    # then, decode the bytes-like object to return as a string\n    return base64.b32decode(encoded_bytes).decode(\"utf-8\")\n\n\nif __name__ == \"__main__\":\n    test = \"Hello World!\"\n    encoded = base32_encode(test)\n    print(encoded)\n\n    decoded = base32_decode(encoded)\n    print(decoded)\n", "path": "ciphers/base32.py"}]}