pack and unpack

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • learnphp25
    New Member
    • Mar 2008
    • 5

    #1

    pack and unpack

    Hi,

    Can anyone give some explanation on these two php functions. Or post some links that have clear explanation on these functions. I am kind of not clear on these after reading about these in the php website.

    Thank you.
  • TheServant
    Recognized Expert Top Contributor
    • Feb 2008
    • 1168

    #2
    What don't you understand? Why are you using them if you don't know what they do? I am not sure what more you can explain than they change data to and from binary to any specified format. Never used them and I am not entirely sure where I would, so maybe if you tell what you're trying to do?

    Comment

    • learnphp25
      New Member
      • Mar 2008
      • 5

      #3
      I am using a database(berkel ey db) where the data is stored in binary format. I want to use pack function to convert some values into binary so that i can compare them directly with the data in the database. I am doing so because, converting all the data in the db and comparing it with the values i said is taking a lot of time. The data base is very huge and time is important for me over here.

      The value of one record is a long sequence of binary data and i take only the required no of bits. like say a sequence of 8 bits.

      Can you help me now?

      Comment

      • TheServant
        Recognized Expert Top Contributor
        • Feb 2008
        • 1168

        #4
        So do you get an error when using the unpack() function? I have never used it, and I was hoping someone who had would see this thread. What happens when you do: unpack($your_bi nary_code) ?

        Comment

        Working...