从十六进制字符串中提取数据

时间:2013-08-30 23:56:04

标签: sqlite hex

我正试图从sqlite数据库中提取游戏(Cube World)的一些角色数据,但我不知道如何解析它。我之前从未使用过十六进制数据。如果有人能指出我正确的方向,我会非常感激。

以下是有关此数据的更多信息:https://github.com/DatZach/CharacterEditor/blob/master/characterformat.txt

这是我从数据库中提取的数据:

key: num
value: X'03000000'

key: 0
value: X'789CED9D6F881DD519C6DF77EEDC7B77773626714DEEBA231A37EB2A52B4A44D770D6B369B6010455DC4524A854A9BA0E2BA699314FD60E98AA0A0A08288104404FFFF4B882422ED1A8D9ADA166D0AAD68B0520D1A3F888258BFBA9D3367E6DC73065F9D4F3D07EFF3239733EFD9D9CDCBC339CF993377CE1C26A27BDEEE1F5BC8CA77CF5E1C55E52D279E22C53AA285336EFF704D7ADABAD796CEFA78CB7D595D3BFBC49CFD603A3F858EB6C88269DF3C01EAA325FA6A4511244CCD2C0659CBA1A5F1DB761441AA5A137451B4E8CBF12BCB00BA189A7474DC184CCAE36D7A7ADC673EA1D0A6F7C72F2A8E39656AA0BDE4341A1F8D4F9601D37844C7D05E48E9B26F7E5519306D6AD1E4A606B798D5CFA2A26C14655C94ADA26C1665BB8CB938AF281BBA8C9ACB8B9FEB326A147159B675C9713B2F7DA386E77EBBDF0CD202D3232DF1177A08479784C6705DA719B67561F50FBEABE8D83A44D0A5646868737363376CC67445D35F36E1A04CF686DD3B77ECDA15ABF0819D67AA223FFEC1F36B5599CD3D5507CB9C686C4D31D5241EA44EBF876C434469D3A4A9CE9EAB8B8AEC2A30CA629F398582D2A69DB5A6B9338A8A54CDC0639F2905464C3F2F0F478806A08D4427842BD57098ECB87DEA02F88D21A64BCF2B0E336D62F4298B9886CAC3ECEA7014DA3858EDA6036534FACEC1FACEAC55B19AD6C36F0C315D521EA64A1EB49C2E31FDA83C1C215CFB55D8521E8C5007B7BB6C663A37945E7CAA9AA5CEC06F0C315D531E46EAA620FA54174B0B861757D96FBEF1C5F58DCB859D93CBC3ACDD2CA38DF01B434CE6CE69A42E71D072BAC4B4B23CCCDACDE9D04602F76F1C3638FEC295B8B771FB10C6701B685313F88DC344C56F26E03706F42919685313F88DC3E68ADF6C81DF18708F42067E5313F88DC374C56FA6E13706F42919685313F88DC354C56FF0BC5F17F42919685313F88DC364C56FF0BC5F17F42919685313F88DC3FA8ADFE079BF2EE85332D0A626F01B874D15BFC1F37E0AB5F64EBDE785E3B135763DDA8EE6FCECC37D6E1DB4D1FC30FB70659166E42593F050CFFA71E581EB86974CC2432D8BE6CAB08D67D335F9DB3496135D4EBABD44ACFD19741926AD0D47F0E212A5C349D967DF753A8E08DA54516F51CAAF755278F1B7817623036D64A08D0CB491813632D04606DAC8401B196823036D64A08D0CB491813632D04606DAC8401B196823036D64A08D0CB491813632D04606DAC8401B196823036D64A08D0CB491813632D04606DAC8401B196823036D64A08D0CB491813632D04606DAC8401B1968A3516BEFD496B5C96A67EDDD9B4C07FEEC27A3B050FA24CD2FDE3215ABE86F4CEFBDE72FA37050EBCB92E54ED561A6237FF4934D58A8A56589BD2E31A5979916FFE92B9F90488A4F092F537D6A71D1573EA1C3F4C10BBE730801B5043AA92CD2C438AE513A24FDFF39622A46A04D89DA793DE1178F9A0AACD9349C9B7D9215AFBC62D7411B9BE3AFDB11B4D1E47E73D29DE56ED014DD4A9F44F4D9DF3DA61418A7ECB582234CFF3AE12D9580C8C7F0E10D2356D50BD95CF380AF7C4242EDB1949CBC6DC9AADACEF4ABE77CE51312EAB22F199ADD662AFAE9AF4C4FDCEB2FA370C8E753039FCE5A15CF30BDF4A6BF8CC22125A5CD43C74D05D3A34C1BF7CABFD13BE45E3C30BBD3540CD25EA6BDABFD65140EFAFA867E5AC6D1023DB6829E841753E1C583871E3415C3F4753686DFED2FA37050EF054A563EFBAC55B58DC919D38105E653368757D911B4B159B6C70ADE8136362FAFB58204DAD83C63DFBF899886CFF2964A7038F3EE27B339039A8EE1E337AC20EB539D27BCA5121CAF1EB3827FA0D1D8BC61B79BFD4C2FE29EA8E183BF58C19F980E1EF4964A701CFBDC0A8E33BDFFBA786A6F7337D3FDBE730895F399661EF69D44A8609C92813632D046E45AA6A3DF7D56CFF06FE73E1FDA8DC814D3E403BE930895ACDDECF9EEB37A13F429196823036D6C7EFC961D411B196823036D64A08D0CB4D1A8B5654A8B53669CB577D833B140E930D499EADC61D535F41EF4BB8AF03745797D51EEFE7FE5E613B5B62CD7E667B1B3D75DA4F7212D9F912C35B9B6526E2FCAEE735FDF23D4B349B93657BB9BBB45D8A355027EE3803DE865B0EFB10CB4A909FCC6017BD0CBA04FC9409B9AC06F1C66B007BD08FA940CB4A909FCC6E1C28ADF6C84DF18D0A764A04D4DE0370E1B2A7EB3017E63409F9281363581DF384C54FC66027E63409F9281363581DF386CAEF8CD16F88D017D4A06DAD4047EE3305DF19B69F88D017D4A06DAD4047EE33055F19B29F88D017D4A06DAD4047EE380E7FD64D0A764A04D4DE0370E78DE4F067D4A06DAD4047EE3B009CFFB7D03FF2DBA8F7A7126571A0CDA8F862B16035D34DC5789FDA4111CC9881B43174D5279A33E74D124FD07464D902A5D6E9CF1984E30240356C0D487F6A27174896809BA681C5D12F84B493260F9CBA0D2E5B7F0175233C903A3666BDADC777743978C4693BAEF5360F4A312EE77E3E89B4FEB395AB4D47DDF639A0F49D8E725A391CD1BCD90C4682F25EDAC7D9C5B1C73EEBB682E0A761BC842C3531EA1C195BDAE1B74CD2FFC6412164D3B48952E87AEF2954B48341A9636AC74010A6EBA31BE39D1B449EF019993429712350FB0AE5F16A08BA6FA3D4993CEBBD14F266151BE8F2F27AD8C4F3D8C9A07D8E31174D1703CB7D58E5B34BB553AB797E0BE0F6D1DB6B6C4337B8B162573663C4AF53B2E81BEDE35BE9B8DD3D04553994F67D779C99C9F4CC2A27A1FB34D17FFDA4F2661D1A4DBE64DDF49F5BC00E8798069320C5D4A940E1715C79CE23E4389B25DD58F941E37FD6EF73D6FF78F2D6487EF9EBD38AACA5B4E3C959FB6745DFE6D24ED989FBB7E7EFB2FD7FD6472E282C76F3EE7CB3F647577EEBA6B449DFBFB1397E5E75A7F4E85C9B7FCEF4DEABEFDBAE47F292BE533'

key: 1
value: X'789CED9D79981C7599C7BFBFAAEA9A9EE99E999EE999E9E9EADC3704724CCE81047210831210C48B6C80849010484C1618842CD7048D222CBB3E9CB2AE1B5814910515A220422088E64242240FC7237151810968105DB9243AD97A7F4775D54C7A1EF79FAD7A9E7E3F0FA1E6F74EF5E4CD777ED7FB3B058065BBDF18D6ED3F17BC708A7C5ED97306880EA0BB77EE171F1C72FB2DF3CE9BB7F88465BE6D88FFC742DBAABDB3E52B78D8421957E0900B0669FC64CC4293C8625C3B4E5A1CA73F49C1C1C62326E9AF2D0F56330E59037EA04A70F157F71BE3D5D7BE2E6E0E3FE172E493C22FC7BC7ABEFADAD7A5BB09DD47C4EB5132A8F1CB4D4E7F9DF28455E07224B1DDB7DD237505635B700BF8B56BA7AD6B9A299D1E724D2156EFE241658C48FB3346E0E531F178932C6AF15B37102203B70DFBB9DE05E9F29EFBEE513A911147A4B9FF2269C7BB4176710495A377B81CF914C2FD158BE2800FB81CF9E4579E7EC46A1124BB73F839EB028A03FC1669FD9A154E1F5BB158ECA0E73EFF0FC9D68ECB8330CA2F6FFE7FB33FF8FFF53499286D52817CBE300744285DCD286D26DE60D22ADF14BBE3F32839286D9AC3F9E62A81BC1DA34B89416953BAD9A455BE59FEA7185D4A0C4A1B279C6FBE26D09C8AD1A5C4A0B4B9F01D9356F9E6E29E185D4A0C4A1B3B189BF085F98680C5631530DAE07D9356F906EFC6E85262384CFF6613F76F144A9B11DF3669956F4ADF8BD1A5C4A0B4690DD2AA9D6AE1FE0D8C360DBB4C9A2A1B81114FC6E85262D0ED54B8BEB9DEEFDFC4E85172206D6C77F94BBB6A559A5AF34E2CD91DAB530981B4A9F1F3CDA93A6D79387876281F55334A1B7C68D2B607E744E0AD185D4A0CB24CA55362F5452AED97A94DC3852B06FC5095A0F24DEBC5277F5AA529DFA4C5C483B13A9510481B172D4EA943A57D6D76BF1E8ACBAB19D2C6C1A2DED64B54DAF1907A0163AE88D5A98460DAA97FD6B3557E3BB5F568918FD5A7A4A0DBA92D9F34060F96AFCC86185D4A0CAABE11CE278CC1C32D43FC748C2E2506A54DFB13334CDACF376DC85D1DA74F4941F66F6A1A837C222C7C30168D9C6F60F28DD7E5E99960BF9D728E14B33E1CF0435582D2A6DC9FF1CBD4BD05EEDF4854FF065B26EBB4DF863B63BE80A7E2F429299036B5B09CD09AA5FD69FF7F71FA94149436D875923164641CFE728C2E250655A6EA8535581B3C3CDE3A21CBF90666DCAFF8DD4693B6903A2BD57EF3409FA916489B54B81FECE17E8FFBC512A54DC76F962D55696AA78AE2A83D71FA941464996A749C053A6D09BCE172FF4642DA1404CAE37C969CA2FA5B7C1E2507996F44D6F9E3DCC0B0D5F2FB3B71FA9414A43699CCA3A7CDD7698BFECB6E8ED5A984A0C6B6EACBF3DF453C23D0C0F3E130EDD4B07F0D0C450881F60BE2F32839A87E71A83F53C21705F76F244A9BA1BD5F69D1862235E383FF10A74F4941D5C52967993158D8C3EBB614AA2E6ED9536B3A7F25EADF645F8BD3A7A4A0CA5441D49EA10D45F4DA68E3F5C530F9E6E93F9D6C0C32DFBCD01BA34B8941E51BDB19B53C30BC6DF3FA1B89D266ECD6716BB5A1849440DBAA387D4A0AB29D726AC5DD2B02C33704EA78DC0F66DC6FEC0D6719831F87DB98FBAB185D4A0CBA5F6C2DA9D7E922EEB6390E97A876EAA8607DB12851BE99C9ED144CBEC9380B4DFFC64397DFF7E3FE0D747D931DB7E1783D7E830C6C1BC76E89D3A7A4A0C6285A9C1FD504865ECB4FC7E9535250ED54D3F941DAA238BCFD9A185D4A0CAA2ECE07FBEC8487A7055A78DF1D74BEB1B3CFAE9F1C18EC3CCEBB3E4E9F92826AA7DA9DCF940D8B73721A865165EA81FD074ED48612441EF73C1EA74F4941ADDBB2AD338DC1C3E2A3380E97A839DFF6479E680B0CA93CDAB7C6E8526250FD9BAC6DA4F1CBD4DE86F07C5515A3C6D2D1B9CB9CBC25FB3738364E9F9282AA6F1A9C1F9839180F775B7E3A4E9F92825A2BD076C2CE4F0406BF019FF2FB387D4A0A2AD6AC15371B6D32B842A096E370983D89230ECE3306B9FE66DADE185D4A0C529B26D71A5B36743970B9BE81E9175FB379BD19A328C1B1FC749C3E2505331F7E8CDECBEA97A9876D9E0F97A8BEDF77B68E3306B9FEE6BF7E1CA34B894169D3EE98BD657E99BA45F8E9185D4A0C6A8CC27AF8D6D1DA5044CAC2771F8BD3A7A4A0FA7EEDCE1D9705862FF27CB882B44903CF2E35862C848D09AFC7E7517250652A9DBA548F6D89129EB551C7F906BA4CD5E3DC202DE482FD2FC5E85262D07571399F14B1D4E1F97089CC37A92B275DEB04063FEBDC7FEA409FA91654CC20C4C78CC1C3A9B61CDE6294363583CD7914C2835383D1F7C5E9535250E33779CBAC851419ECA9419EC76F60C644C7EC3CAB3630382D18B32F4E9F92826AA7F2A939265DC49D63D0CAED14CC18C55997BDF5516DB0205AB0FEBA387D4A0A2ADF149D63F281E1378D7E3A4E9F92821AA378EC6BE60214E1092B873B2F1BE833D5829E834941AF4BA781AD26DECF2051DA60F193570506A711B8294E9F92828A19DA9DDFEAB1740A189A78FC4622B5A99BF8CBF57A87A665C16A024E8FD5A984A062868C7DA25EB8E5C70CDB9A91E17C0353DF34CD294D2A1B9A51BA304E9F92828AA732548E1419945A50C7EB4411ACD92FFD7CA94A5B1E52CD681E3BD067AA05156BA6C4959D3AED8973EAC1E71713AA5F9CBFF11C6328C26942ED4762742931286D5C71DA3A95F6CBD49206D4707D03D3F7BBFF233523038368C6B766C7E9535250FD1BCB691EAE0D1E5636F1BA2D89CA37E3F74DD30B29687EAA0193DE1FF0435582AE8BEDA24997D0DBC0F7C148943699136F3D45A5FDBAD86A40EEB3B13A9510D4F9C54567953E671F16DEE5713F85DA3BFFD905259316D42FBEED86813E532DE8FD9AD699E6009C12EE69E0790689DA77B763FF309316F29C7DBE571C269E2A06F19355C47F34A39DFBC53065EAD90F67194309D6026C3F10A34B89418D89E6C4A78CC1C24181468EC361B419F48E396ECBD7C61618C4FB60508EA782B4C009695EB72551EBFD066D0AD282D68D8EE5760A87C937456C4C23CD713882363CD8024DE7DFA4D17E5C8C2E250635CF902E6F7CC9E2CC51BCBE58A2FAC58FCCBFB12930D843F122C7E108F20D82BBB9B298320AB5037CA27A5075F11BA70E32060F188ADF9D16A34B8941E69B5CA3585036EC1D821CF78B61E2A9C620DB080F6228266E8DCFA3E4A0C6D273CE91C1A56EB87428EFF395A8F9F0210F07E922F56F066D8FD1A5C4A0EAE2E6723FB8846D691EF793C83285BA25ED6583D87D640DCF6BC2CC33E4ADA747A8B463617C09CD3CEE07A3CD55B36F3B4FA56D0B7609DFFAD8801FAA12D499529EB34D0F8A3A02BD43E1717D03732EE41D67997BCB60213514577F6A808F540DAA9D6A721ED7ABD8FC02754733AF4B97A8FECDEDFB3698C30F3DA48AB89BCFF78339FFC6763A8ED7060BBF188E46CE3730F30C2FBE7FB43158705CBCC8F796C1ACBD4EA766960DDF6EE0F16289CA37636FFC8AB9BBC2A2EEDF44DE7707B32731E7F4EAF5C5BE36BD3672DCBF8139A72D7DBA9106F2BEBB994FC4E85262507DBF46CB2CA1E57C534695A9E66957EABB8E85BCD7A36563AC4E250435269A7386184311BD7CDF9D42C5E1996573CDDDA316DD23949A10A74F49419F0BE9AC3D521B2C7C309AC78B256A5EF39583579C1A186C0FAFBC13A74F49419F092E6E3E2130BCEA85D6FF5533521BEBA63BBF6A0706C7C3269E678039C3AE2DF581398F222B76D5F1BA74891ABF79F1B341ACE9C11E856FF378318C3675F61C63F0D03584EFBB93A878EAED756650C2F2E3A9917873C5409FA9169436CDC1FD0CBE360B9B90B76DA7C152B156563F75DAD1E954FD065ACE645B3A6DD7EB67463F6BF5FB75EA6999675ADBF5D3AED17657DBF533D5A8FFDE9C7AD6E874AD7E66F433ABBF9FD5FED5E967DA3CF5F7EBCCCFD17EA632031E4637D86853D7B570910E366D0B680357C584AA6F1C0CBAA86C28B03612956F8107D2DA60A1901FE80355848AC3E714167569430968F1D371FA94144C997A5AE71BBA95AB85CB9444C5E10EE68F2F1BB82E56A87C53C62AA2C0054AA1DAFA59858F9BB46CA766B33C307D3F079BFF41A72DAE6F0CA62EAED3EB284491B531A8FE3760F66BFA3143A16DA00F54112ADF7496EB178FEA9B4EAE6F60F6DD39B847A71D8E190254ACE9A0D5A42D392C1AA74B89418D1300F5262DB87F6350EBFDA61782C5D67E7DD3E4A763742931A876CAC1D9C660D1B9905CA608956F1C3C650E79F1680D3F6B4398786AAAB97BD48FA778C1BE428DB5CE2D8C5FAAD319D26A1ED73728C70C41BA184D57336AEFBC83933EA70DBE360B591B898AC30133B4E5F8F1D4D218FD4912AA9D3A2EA85F2866383194AE66D4587AB90C3925D286CB1461B4B9AC41A5E980C805AC8DC48CDF98F38B6DBFBE5912A7430942E59B630B8BF52213DBEF171FE7A763752A2198F11BB3EFCEF60DA7719992186DC6850C1F656D246A6C0B78758D4EFBF5CDBC013F513DA8FECD8CC28FCC1E21BF9D9A81995CDFA03C7ED3A9CF5AB5FC207C2E972949BFBE9FE0BE9FC1C453C3B33AEDD7372D037EA27A50F9667E9F786A3ED737288FDFFCF1F365C3602E5312B356E00863F0EBE2C9AC8D44952960B43194B8BE31A8367C4E6182E918FBF926CFEBFD24EADC2407A7E88C43F1D4142E5312D3F7BBCF9C63E2E79B49AC8DC4AC2F366B6E68FC66EE401FA8229436B30AAB82CD1E4007AFF793A8FD150EF6EA7BA0A9BE99CA654A62E6C3CD5DC7B42E9D634D859AF3053E6D76DA6550E0CDE10AA54D67E11557A5695CBD83D7FB494C993A56A71D8FC6B6B84C11A67F3351E71BC7E2BAD8D0773F836F284C8DC997A4A1CAD4B4C2722D08AD31C9F37A3F89DADFE920AD6F7EA6986122972989CA37C0A22B549AE635670EF4812AC2C453C1F88D4563A20CA16206E087A5B281C7B614EAAC8E503ACBDA184C1BBED72B1BB89152987CB3D41832B42E9D214CAC69AE65256DB84C29D41A5AE0C1A3B4C1C3736D981FA347C941F56F84632E7113251C2AA96999AA47F56F761CFAAB3158705AB0E3508C2E2506B56E4B38C7940D9C6F34A60DDFA8C78BFD32C56DB8A6EF18056B53C6B45361036BA3E8AB0DE79B32D4E7237D9AFB1CCCC587D829A43687B131ACCD407099AA8CD146F4B1319C6F06A2CEFF236AA236D646C165AA32A4039D2590830A32690D0E8FFD29A436BE38748FA4AD0D7C89A482CB54659436C39D901EBD82EF6890A8FAE6E96768BE81CA94107427CC363E6B1F5A9BB49A5F90DAF875CFD15CA824521BF1B779C311E49BE31D6CFE4ECC6E2502A94D76B833094A1B2B8BDE0286737D03AD4DEEF967687F2F69E357CA4E018B7A63762B11286D863B34CE45DAA4047E534096F30D4C1BBEEFC550F5EB7FFDC31DB139942028CC14B53376864C3B9BF0DEBB71F9932454FFE6D021EADFC882E4014371224F8A436923DCA86D502C9E240F9245F4E9EB1563F124796440F54DC4747C093BF8C80E94C76F26422F12F0685F224384B5A1362BE5D19E0686A0F649A4A336EFB06F561F946FE898B6536BCBE9DA01DEAF26CCBCA6D5C7C694F3CDB75696D3BC6E5F61F20D8F17FF7DB03695616D2AC3DA5486B5A90C6B5319D6A632AC4D65589B30E9F0BCC28B02170E8ECD95C4F1CA6BA18423787EAA225CA6C25C101E039D2DB0D8ADF86AD5B13ABC54EB41114D573991FAC5AF6FBAB7C4E64AE26808B753DB45345DE58C08AFD3F2B539C0C7FC05387DB419C16BDA0E8F5FDF3CC1F54D05B87FA3A0354934C7906928DBAC6E9E8731D0DD5C993E0BF539EF2828EF64C219C5636D0CA443A44C7D81B531F4D3A63B7A9E523523B529F4B731BA9DC2C783E3DAEC46D2A67DF4001FA91AA8FC64FA8C4A70BE51A8FA6675D017A6BA3885864763742931D0DAC74C680F83A8E73D54065AAB9FA90D8DE19478CCD820FB7E2234D760619788CE3D542DB22EAEBB7D6160C862A1C03BBC6E1F6A6D52267F7D5760A845974048AB2A661428DF84EA17417531D73704DD7992A90B192CEEDF18E88AA54CD3B6F0581FB7539A7EB1E635FA8C0146EE63C8844F3C6C957A71BE81DAC79069A909F7673608D470FF068729531BE435160C74CCD018B5713BA5D0F926A85F280EE7BA58A1B4C904F50B8D89729952F49B9FDAC0F9C670B8FE0D8FA52BA83065FA6CB6E3BA5821DBA94CC850626D0C32DF8463CD0C6B63903143D890656D0C79F4D146B03606D225D31AB5B1360AD9BF09AFA32862346BA338DC5A010EC215AA5F5C9EFFA6BE1FEF8356C83998B6A88DCB944295A98B1F3369BF4C3D3A15F7F1BAFD80C8997EBD82CFF80B714F249F08AC9D15972709A43BF4F55C81EEE3E37224795C716E2871AEC0837CC65F4064AE8EE77C2344F2C90E81FB36C5E64AC2E1FE4D98BE7BEFB84C5582F34D451CD6A632AC4D8448FDC2DA84C944E227D64661EEBDCB5F10B55BB8745C1CFE240DA9CD8888E990CDB1B8446A33326AE3397185D4C65367446A1E656D14529B5977DDF2E7B2C971B96F2C91DACC88D42F5D366CCE3AD0DA0CB9E9B1F056681BE3F8BC7D686DDA5EDF1F329D6BE33A3E97024A9B9669BBC3FB3B160A3CF9485CFE2409A94DE7228E1B0E83D466647F1BA3B5191B316D15B8A9331E6F9285D466487F1BA3B5C9F7B7315A9BCFF4B7315A9B63FBDB18AD0DAF313E2C529BB9FD6D8CD666767F1BA3B519DDDFC6686D96F4B7315A9B95FD6D8CD666667F1BA3B599D5DFC6686DE6F7B73165568704C9C5E746A2E032F57F83B70A5586850973E8502871994086E5A9000B13664EB8363E56E0DA6362732571743C154A1C2F70179F9B1E900ACF7F6F1270793E3CE0CEF008CE7C810FF89E8680ED7DEE6928F13DE2011BFB68B39DD70A0444F309EFBDAB0CF76FC28C0CB7E1BE3613E7C4E448E2E17C5319D6A632AC4D65589BCAB03695616D2AC3DA5486B5A90C6B5319D64671EA4281E7FCE77AFF8F10E70F0F7F4F60188FE3F808674FF8462157E000DF7BEC23D2BBFAE8F20EEB023A6BF521D6E53064DAB6F4D1E58FAC0BE8CCC39D651D3CD2E54DD60574F66CA8DE15A4CB76D605A4CB8EB20E16E9F217D605A4CBE6B20E19D2E53DD605A4CB8FCB3A644997B75917D0F9A93F2D4FE2CA7AF775D6C5C7AED955D645D62F4FB22E3EA2767FA4FF62611FEBE2E3FAED72208447BA1C645D7CECF4036E70778945BABCCFBAF808EBE14839B2399E9608776B1F5D7ECDBA80EE5A78B35C8E3CD285EB5DC276B747EA171B1FB22E3E22F540A41C391C07486AF03B37B8E6D0235D5E665D40FDDD3F94FB2F16E97217EB029A0FF859A41CA5F01CEB028A1B9F7683F9238F7479887501F57777BAE58BFB4897CDAC0B68FE283AEEED72FF4522D2CFF4D1650FEB028AA7F746FABB2E7EC4BA80FABB8F94FB2F16E9C2712321ACA722E5A806BF645D40E3752FF4D1E559D605144F47FB2F35788B7501C5015BCABA58A40BCFC312B5D8E98ED25F8B2CC5472FB12EA0F668ABDB641232BFF4B02EA0718615C3836B1C3D4AF33A3242B891F3FF37A491E13DA4A0FC51EB84F2CBF7D37E3A4E7F92829D6E480577985B389046436AA0F7AB05211AC3E5E6E7B5AC8B44A4EAC23A7CB5367A0B73D5E2A0CEAF63341E2E665D14B6DB6885C6EB6EAB45CE1AE8FD6AC145AB135A1774A00E45DE2E008A8F52E576D9C2C7EB90E17A1734FE12D1617186759108A735DC8F5B9A412BF7EB40E3DE0D611DA667D0189B2F492285362BB48EECA319B4717E01C501D954683DE6820CB25CBF80C6775BC371C04D59B4713C0D8AA76D119A3F3A29CB7737496C379B0AF577D76651CFFD3A503C6D87EBD97FAA87CDF52E68BCCE0AEBB0B91E16EB028AA7B3E58487DE7A1EC794D8351927B41EF34FF57DEE7BAD56442A1DCE1F5B1A50CBF90534CE101997FA61038F4B49EC745DAACE242C5CDF802CB7D3A07186C8A9EAD734A291C7EB4071635DB9C3E2E1EC466E8F24B69B0B8FEF7EBF114D9C5F40E3524DE176F92739E4399E068D4BB58775F8450E45EEBF80E2E99C08CD07DC9A4323B747A0FE6EBB08FA2F167A733C4F2211221B6E7FAE6DE2F90089A88DCC2F7EBA098DAC0B289E6E15A138E0AD26B4703902C5013984C6BDBFD784A6815EAF1A849B0997A33DCD5CBF485C5F87206EF4B0AF1959EEBF408E7B3BA1787A33EBA2F0E346678CFE5A78D892F3D3B13A9410D2483B93F4D72283E7327E3A56871282B022EBEB1ECFF3F8AE44A422FDBA5FE5795C4A92F2EBD950DCF8E53CD7BB12BB262F42FB6CDECFA385F30B689CA131153A9FE1EE16E438BF80E200C70EC5014B5AA27771552D4244C62DF7B5F238A644389178E8B156D47339028DEFAE889CEFDDCAFBB224943942EBA57C5D18C2761F724371A3DB8A37787F23681CF389C8BEF2363E4749E2E267917DE56D7C6E8584CE970A9FD3D6C6E74B49841539CFDB2DF039D612E13ED04797775917503C1D3A67CB235D5E635D40F1D1939173B70A788175018D4B45EB97763EA74D42E79A84CF6B6EE7F38224B6BB23720E643B9FD72CB1D39BDDD3F5D7429E8FF93FAC0B68FCE59148FD52E4F39A250E7646CEAF2BE2CFAC0B280E782872AF4291EFE19008277A8F98C7F74249443A9AF6E2712371B8E81E1D5AE7E1FF77E1D618DD490C767AC288E01C258B74B9374E77128388CE2E7697B07A644CAE240A51DB3D3A9C2EC5E548C248E182D1A17958D64563BBDBCE0C8D338C2C219A7FAA951ABFFD313BB3527E7E29E0E811B13A9410847B7F243D28263F92468DDFFE84F6ABF9BA703922EC1A5A7BA8B14897F3591740EE110E4E08F2E82AD46D67C6E84E6248F9E566A1FE5A701C1020C4F848FB3398E3008988AE8EEA1ECC7180C4F1CB51683E60E4E0389D4910767A55B9FDB1A81C3184EBB73FA1751E238770FF4562BB176E0DC5471882091C07F8B4E927F56196AF5AB77CDD9A655D2B869DBB6EED255DBB978E1ED5ED9BBF3EE8AA91F43CAFE764F92A652F3A6468F9BAAEAE756B872D5FB6F6DCF507B735CB779FFFDAE5F2DD553D5DF25D1A52A79A5DBEF42F77B4CA972EEEBA4EBEB4A9E79BF225FABD50DF72DDDA35E7AF5D71F6D496EF3C3F85BEFFDFB9E717D3F3CA9EF9324BD30FA2BAF0D2652B57AE59F1C0D72FCCCB9F52B7B29E9E3FEDF9BAFC69D423A391B679979C73CE9A15E75DF2B95DEBFF22FFBA45F3D7C8E7D53DB7C917F3FAC72D5F76D145EBBAD66D19259D3BEECD2BE55B57F5AC926F5DACFF1593274F7B75D30F46D3B706BDBF7A2C3DBB7B5E93AF5CEEFFA92BFB3FB963CACBEFD923E88D0367A486D3F3869E4EF92F382605798E8C7973CA9499B7DF7EAEFC7B57AECC17D53F768AFCA197F47DB573C6D52B1F1A4CAF2C6C4F1FA95EFDB27C75CCA8C8AB9D1DD3A6EE7861E1787AE5C96B172F52AF2E93AF1E7A49FDEEF4ABD37C265F7AD74C8FDEB9AFF5D6D7AE96EFDE28DFBDC01152F2E9C4FE7F3F4DFE9D47FDDB4B83E8F948CFC6E0A5D00F94EF3EB8EB74F9975F77E906F9EE833DD7CB77BF3225F2EE8C99333A3ADF5C5F23FF4DFF79C5840FD55F3E56BEDBB934F26EE7A4C9D33B2FBAF49925F2DFFF68BBA5F4FFB17CB7F72369D487FE51533BA64EEF58B6FB8D61F4D282174E19A6143843BE7CE3974E965964DAA499936674747C62E73EF9EB1EBAF99BF2377679CFABF235B1F393EAB569D3A64F9D39F9E2A76B52F4EDBA5B0E9D46CF7B75EEF8E4551B1BE8B51597FDE39A75E77735657F267F9923266D96CFCFF7AC91AFCD59FFFAF45CF8373479D2A49953A7CE7CEDB6ED320FBFFDFBB553E9F9E59E7B2BFF8BE81BF46B4E859EAE7E0AFDACD37F0CFF0B91C3AFFC'

key: 2
value: X'789CEDDB6D68957518C7F1EBDAE6749E5150D3CC3423154B0AC1170A5A48B330C8CA0A2942F281B5C882C215A22F54CAA0402209342163646B9060440F12990F053E4456064264A12826546F22256AA9DDDB3A67D791F37BE1ABFF1FCEF7033767D7F1162FBEDC9CB3ED78BB99CDEA5E30615DF1B8A97DDAC0E3C6B60356D6511C9F5CB87FAFD9D2B9FDB317474371AC9B33F8E7735A6CC854370CDA1687B96E33E7A6DA242F5C2FB5F5544D6EBBDA132D9219AE97DADEA99ADCDEE27A19C0F5524B63F3BB434343FFFBD138AE97424BBC5E5AB95ECA5AAC77682859BBDB1B77A4DB261F63E2F5E25C2F437AE350BCBE34F2FDEE00DE8F6A195E1C9D1D5D9D4B3B3AFBC77296C6E298F3CCC5894DC5E3F4FF9F6F1C1EFE5EC3D0B9F56EA04DE9831F2A4F34D86AB7E619E936CACDD9D5616872BB716BB255B2D3D51D86996E4B56A4DA243F772E0BC309B7B66B92AD929D7D8BC370D66D5767B255B2F3E04D6168769BF869B255B273E8EF3074B84D3B926C95EC1CEC0B43AFDB9665F2D4FAB3307C7D955BCF99649B64E79547C2F095DB13B4A9782ABE16BFE6B6F9CA64AB64E7F0B030F4B9BDF866B255B2B3E7B730DCE5F6E4EFC956C9CEE2D36178C1EDBA61F2D4BA33E596308C771BB336D92AD999302A0C6BDCFAF6A6DA243F678E87E188DB8A6793AD929DB6EBC3B0C86D436BB255B2F3E1CD6138E076455BB255B2F3D16761F8D2EDD4BFC956C9CEB9E56198E276F78E64AB6467D2E1305CED36FA9E64AB6467FDD130F4B87576255B253B37EE0BC3D36EEF8F4FB64A76CE7F1186D96EA3E6255B253B5F2F0AC369B78F8FCA53EBCE7D0F87E157B7F74E265B253BE7AF0DC31F6E277BE5A97567C3C4308C749B7521D92AD9B921FE2E7DBEDBFCEDC956C9CEBDB785A1DB6DEA36796ADD5975C9E7538F1F4BB64A76C67D1E867FDCBA7AE4A9756761FC5EEF21B7DDBF245B253BA5056158EF36839FA72ABE793B0C2BDD76F2D95DC59EF87DF064B79F0F255B253BCB638BAD6EBD27122D92A163E7C2B0DF6DD5CE64AB64E7DCA361B8DD6DC79664AB64677BFCF9E9A0DBA4C9C956C9CE85EFC3D0E736EEC764AB64E7DBF819CC4F6E6B5F4AB64A76CEBC1C86796EC7BF4BB64A7676C7FF63B2CF6DC9FE64AB64E7F5383CE6F6179F8757CCEB08C324B72D7F265B253BA76687E188DBAD9B93AD929D57E3ED796BDC1EE03DDC06EFBDEBBF07CF2FB9D98E7BEF34DA68B4D168A3D146A38D461B8D361A6D34DA68B4D168A3D146A38D461B8D361A6D34DA68B4D168A3D146A38D461B8D361A6D34DA68B4D168A3D146A38D461B8D361A6D34DA68B4D168A3D146A38D461B8D361A6D34DA68B4D168A3D146A38D461B8D361A6D34DA0C9A2E9EA78F461B8D361A6D34DA68B4D168A3D146A38D461B8D361A6D34DA68B4D168A3D146A38D461B8D361A6D34DA68B4D168A3D146A38D461B8D361A6D34DA68B4D168A3D146A38D461B8D361A6D34DA68B4D168A3D146A38D461B8D361A6D34DA68B4D168A3D146A38D469B41DC7B77F968A3D146A38D461B8D361A6D34DA68B4D168A3D146A38D461B8D361A6D34DA68B4D168A3D146A38D461B8D361A6D34DA68B4D168A3D146A38D461B8D361A6D34DA68B4D168A3D146A38D461B8D361A6D34DA68B4D168A3D146A38D461B8D361A6D34DA68B4D16853ADB538DC2F563DE776B1F6C975C69BE8528B8FA04B2DA5B174A9A5349A2EB5945AC23096F7A6B2D2C830385DCAAABA34D0A5ACAA4B892E65555D5AE952D6541C23CA03AFBB158DC343175E5F2AFA3B3417476371AC7CFEB959DD0B26AC2BBEDCD43E6DE07163DB8181D3C229FD63E932FF95FF00E9CCAE8E'

我使用zlib_decode将blob转换为bin然后使用bin2hex将bin转换为hex。

$conn = new PDO('sqlite:characters.db');
$sql = "SELECT key, value as value FROM blobs";

$q = $conn->prepare($sql);
$q->execute();

$q->bindColumn(1, $key);
$q->bindColumn(2, $blob, PDO::PARAM_LOB);

while($q->fetch()) {
    echo 'key: '.$key."\n";
    echo 'value: '.bin2hex(zlib_decode($blob))."\n";
    echo "\n";
}

1 个答案:

答案 0 :(得分:1)

这些不是十六进制数据,而是blob literals,这是SQLite转义blob的方式,因此可以在文本命令中使用它们。

从这些值中读取二进制数据,使用zlib(其中包含几乎所有编程语言的库)对其进行解压缩,然后按照链接到的文档中的描述获得二进制数据。