Биты хранятся в Vector

This commit is contained in:
2024-11-18 01:35:40 +03:00
parent abb078e1b6
commit e6d636cff2
4 changed files with 16 additions and 8 deletions

View File

@@ -1,6 +1,7 @@
module Main (main) where
import Codec.Picture
import qualified Data.Vector.Unboxed as VU
import Lib
caesarShift :: Int
@@ -15,7 +16,7 @@ main = do
let encryptedText = encryptCaesar alphabet caesarShift inputText
putStrLn $ take 30 encryptedText
let encryptedTextBits = textToBits encryptedText
putStrLn $ concat (take 30 (map show encryptedTextBits))
putStrLn $ concat (take 30 (map show (VU.toList encryptedTextBits)))
let encryptedTextFromBits = bitsToText encryptedTextBits
putStrLn $ take 30 encryptedTextFromBits
let decryptedText = decryptCaesar alphabet caesarShift encryptedTextFromBits