Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deflate compression error #53

Closed
friggy84 opened this issue Jun 13, 2013 · 2 comments
Closed

Deflate compression error #53

friggy84 opened this issue Jun 13, 2013 · 2 comments

Comments

@friggy84
Copy link

i have found an error while i'm compressing a text with the deflate compression.

this is the code used:

var compressed = new JSZip().file("records.txt",JSON.stringify(packet)).generate({base64:false,compression:"DEFLATE"});

where the result of the JSON.stringify(packet) is:
{"RTS_1PG_SEC_DETAIL_REPONSE":"[["poid_sect_detail","tmp_activity",["07431370856073626","07431370856123482","07431370857111864"],"clgcode",[null],"data_agg",["10-06-2013 11:21:13","10-06-2013 11:22:03","10-06-2013 11:38:31"],"user_id","value"],[1359,0,0,0,743,-1],[1360,0,0,0,743,-1],[1938,0,0,0,743,-1],[2118,0,0,0,743,-1],[2119,0,0,0,743,-1],[2120,0,0,0,743,-1],[2121,0,0,0,743,-1],[1352,0,0,0,743,-1],[1353,0,0,0,743,-1],[1112,1,0,1,743,-1],[1113,1,0,1,743,-1],[1116,1,0,1,743,-1],[1117,1,0,1,743,-1],[1119,1,0,1,743,-1],[1120,1,0,1,743,-1],[1121,1,0,1,743,-1],[1114,1,0,1,743,-1],[1115,1,0,1,743,-1],[972,2,0,2,743,-1],[974,2,0,2,743,-1],[1941,2,0,2,743,-1],[978,2,0,2,743,-1],[979,2,0,2,743,-1],[980,2,0,2,743,-1],[981,2,0,2,743,-1],[975,2,0,2,743,-1],[976,2,0,2,743,-1]]","RTS_1PG_PRODUCT_REPONSE":"[["tmp_activity",["07431370856073626","07431370856123482","07431370857111864"],"clgcode",[null],"poid_product","stato_presenza","data_agg",["10-06-2013 11:21:13","10-06-2013 11:22:03","10-06-2013 11:38:31"],"user_id"],[0,0,2169,2,0,743],[0,0,2170,2,0,743],[0,0,2171,2,0,743],[0,0,2172,1,0,743],[0,0,2173,2,0,743],[0,0,2175,2,0,743],[0,0,2176,2,0,743],[0,0,3082,2,0,743],[0,0,2177,3,0,743],[0,0,3083,3,0,743],[0,0,3084,2,0,743],[1,0,2010,2,1,743],[1,0,2011,3,1,743],[1,0,2006,2,1,743],[1,0,2007,2,1,743],[1,0,2008,2,1,743],[1,0,2009,2,1,743],[2,0,1692,null,2,743],[2,0,1693,null,2,743],[2,0,1694,null,2,743],[2,0,1695,null,2,743],[2,0,1696,null,2,743],[2,0,1697,null,2,743],[2,0,1676,1,2,743],[2,0,1677,1,2,743],[2,0,1678,2,2,743],[2,0,1679,2,2,743],[2,0,1680,2,2,743],[2,0,1681,2,2,743],[2,0,1682,2,2,743],[2,0,1683,2,2,743],[2,0,1684,2,2,743],[2,0,1685,2,2,743],[2,0,1686,2,2,743],[2,0,1687,2,2,743],[2,0,1690,2,2,743],[2,0,1691,2,2,743],[2,0,1892,3,2,743]]","RTS_OCLG_LOCAL":"[["ClgCode_local","user_id",["CAMILLA.BORZILLO"],"clgcode_sync",[null],"CardCode",["10338420"],"Notes",[""],"Recontact","Closed",["N"],"CloseDate",[null],"ContactPer",[null],"Tel",[null],"Fax",[null],"CntctSbjct","AttendUser","CntctCode",[null],"UserSign","Action",["M"],"Details","CntctType","BeginTime","ENDTime",[null],"Priority",["1"],"endDate",["31-12-2013 00:00:00","31-07-2013 00:00:00"],"status","personal",["Y"],"inactive",["N"],"prevActvty","AtcEntry",[null],"U_CATEGORIA",[null],"U_insegna",[null],"U_tipologia",[null],"U_tipo",[null],"U_business",[null],"U_frequenza","U_categoria1pg","U_livcliente",[null],"U_id_categoria_ass",[null],"U_regione",[null],"U_canale_1pg",["Super 800-2500"],"U_fine_sellin",[null],"U_inizio_sellout",[null],"data_agg","Transfered",["N"],"U_KPI_OK",[null],"U_cm_cat",[null],"U_cm_ul",[null],"U_ul_facing",[null],"U_ul_sos",[null],"U_brandblock",[null],"U_ul_vaschette",[null],"U_ul_visibilita",[null],"U_display",[null],"U_esp_cat",[null],"U_extra_disp_perm",[null],"U_Notifica",["0"],"U_azione",[null],"U_ID_Mail",[null]],["07431370856073626",0,0,0,0,"10-06-2013 11:21:13",0,0,0,0,0,-1,743,0,743,0,"One pager Dressings 2013 SUD",4,1438,0,0,0,-3,0,0,76420,0,0,0,0,0,0,4,11,0,0,0,0,0,0,"10-06-2013 11:21:13",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],["07431370856123482",0,0,0,0,"10-06-2013 11:22:03",0,0,0,0,0,-1,743,0,743,0,"One Pager Hand Dish Wash",4,945,0,0,0,-3,0,0,76117,0,0,0,0,0,0,4,4,0,0,0,0,0,0,"10-06-2013 11:22:03",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],["07431370857111864",0,0,0,0,"10-06-2013 11:38:31",0,0,0,0,0,-1,743,0,743,0,"One Pager Hair SUD - SUPER 801 - 2500",4,1934,0,0,1,-3,0,0,35498,0,0,0,0,0,0,4,9,0,0,0,0,0,0,"10-06-2013 11:38:31",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]"}

The problem is the world Wash in position 3359
The deflate works if h is deleted or substitute with an other char, if the wolrd is swapped like "One Pager Hand Dish Wash" ---> "Wash One Pager Hand Dish"
or if at least 5 spaces are put beetween s and h

@dduponchel
Copy link
Collaborator

Thanks for the bug report !
This is a known (and annoying) bug (#22, #29, #43, #52) which should be fixed in the next release. The workaround is to use STORE instead of DEFLATE.

@Stuk
Copy link
Owner

Stuk commented Oct 5, 2013

Fixed in #56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants